summaryrefslogtreecommitdiff
path: root/share/make_supported.py
diff options
context:
space:
mode:
authorChristoph Berg <christoph.berg@credativ.de>2022-11-08 11:40:39 +0100
committerChristoph Berg <christoph.berg@credativ.de>2022-11-08 11:40:39 +0100
commit6f19923a918f7fb63a444b0c99950fdbe9d2f74c (patch)
tree326c13aee4c097b57d784572fa0d322146c832a2 /share/make_supported.py
parent14581c70e561f9f350a4d5ad86924a5d466028d4 (diff)
New upstream version 20221106+py3upstream/20221106+py3
Diffstat (limited to 'share/make_supported.py')
-rwxr-xr-xshare/make_supported.py9
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)