diff options
Diffstat (limited to 'share/make_supported.py')
| -rwxr-xr-x | share/make_supported.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/share/make_supported.py b/share/make_supported.py index 67ecebd..339f9fe 100755 --- a/share/make_supported.py +++ b/share/make_supported.py @@ -9,9 +9,10 @@ sys.path.insert(0, "..") tmp = sys.stdout sys.stdout = sys.stderr from chirp import * -from chirp.drivers import * sys.stdout = tmp +directory.safe_import_drivers() + RF = chirp_common.RadioFeatures() KEYS = [x for x in sorted(RF.__dict__.keys()) if "_" in x and not x.startswith("_")] @@ -58,7 +59,7 @@ def supported_row(radio): try: value = ", ".join([str(x) for x in value if not str(x).startswith("?")]) - except Exception, e: + except Exception as e: raise if key == "memory_bounds": @@ -149,7 +150,7 @@ models = {"Icom": [], models = [] -exclude = [directory.DRV_TO_RADIO["Icom_7200"]] +exclude = [] for radio in directory.DRV_TO_RADIO.values(): if radio in exclude: @@ -167,7 +168,7 @@ for radio in directory.DRV_TO_RADIO.values(): def get_key(rc): return '%s %s %s' % (rc.VENDOR, rc.MODEL, rc.VARIANT) -for radio in sorted(models, cmp=lambda a, b: get_key(a) < get_key(b) and -1 or 1): +for radio in sorted(models, key=get_key): if counter % 10 == 0: output(header_row()) _radio = radio(None) |
