From 6f19923a918f7fb63a444b0c99950fdbe9d2f74c Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Tue, 8 Nov 2022 11:40:39 +0100 Subject: New upstream version 20221106+py3 --- share/make_supported.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'share/make_supported.py') 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) -- cgit v1.2.3