[chirp_devel] [PATCH 1 of 4] [CIV radios] Fix common code for radio with no skip flag
Marco Filippi IZ3GME
Tue Jan 19 13:02:34 PST 2016
# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1453220451 -3600
# Tue Jan 19 17:20:51 2016 +0100
# Node ID 8b30f8921b6006272f1ffd2aaa027e89a940fe14
# Parent 0758ce12bbae704776ab0cc854b207b521f00d81
[CIV radios] Fix common code for radio with no skip flag
Introducing skip support for IC-7000 common CIV code have been modified but
other radio (eg 7200) do not have that flag
Introduced with fix for #3085
Fix #3185
diff -r 0758ce12bbae -r 8b30f8921b60 chirp/drivers/icomciv.py
--- a/chirp/drivers/icomciv.py Fri Jan 15 09:08:36 2016 -0800
+++ b/chirp/drivers/icomciv.py Tue Jan 19 17:20:51 2016 +0100
@@ -307,10 +307,14 @@
memobj = f.get_obj()
LOG.debug(repr(memobj))
- if memobj.skip == 1:
- mem.skip = ""
- else:
- mem.skip = "S"
+ try:
+ if memobj.skip == 1:
+ mem.skip = ""
+ else:
+ mem.skip = "S"
+ except AttributeError:
+ pass
+
mem.freq = int(memobj.freq)
mem.mode = self._rf.valid_modes[memobj.mode]
@@ -386,7 +390,10 @@
if mem.skip == "S":
memobj.skip = 0
else:
- memobj.skip = 1
+ try:
+ memobj.skip = 1
+ except KeyError:
+ pass
memobj.freq = int(mem.freq)
memobj.mode = self._rf.valid_modes.index(mem.mode)
if self._rf.has_name:
More information about the chirp_devel
mailing list