diff options
| author | Matthew Poletiek <matthew.poletiek@gmail.com> | 2020-12-10 21:48:30 -0600 |
|---|---|---|
| committer | Matthew Poletiek <matthew.poletiek@gmail.com> | 2020-12-10 21:48:30 -0600 |
| commit | 84179524b1cb6a00e0595229af2560aa0b3d5fec (patch) | |
| tree | 78b93b675b2c75bba9070a44e1ab40acab7698df | |
| parent | b5bcc537a84c3a5f4be247647159bb18ac8bb260 (diff) | |
| download | chirp-84179524b1cb6a00e0595229af2560aa0b3d5fec.tar.gz chirp-84179524b1cb6a00e0595229af2560aa0b3d5fec.tar.xz | |
driver syntax fixes
18 files changed, 26 insertions, 26 deletions
diff --git a/chirp/drivers/__pycache__/alinco.cpython-38.pyc b/chirp/drivers/__pycache__/alinco.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..e16362b --- /dev/null +++ b/chirp/drivers/__pycache__/alinco.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/ft2900.cpython-38.pyc b/chirp/drivers/__pycache__/ft2900.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..ae87c31 --- /dev/null +++ b/chirp/drivers/__pycache__/ft2900.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/kguv8dplus.cpython-38.pyc b/chirp/drivers/__pycache__/kguv8dplus.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..23fa78a --- /dev/null +++ b/chirp/drivers/__pycache__/kguv8dplus.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/kguv9dplus.cpython-38.pyc b/chirp/drivers/__pycache__/kguv9dplus.cpython-38.pyc Binary files differindex f95fe64..fe15398 100644 --- a/chirp/drivers/__pycache__/kguv9dplus.cpython-38.pyc +++ b/chirp/drivers/__pycache__/kguv9dplus.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/puxing.cpython-38.pyc b/chirp/drivers/__pycache__/puxing.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..c6a9ff5 --- /dev/null +++ b/chirp/drivers/__pycache__/puxing.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/radtel_t18.cpython-38.pyc b/chirp/drivers/__pycache__/radtel_t18.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..b03f655 --- /dev/null +++ b/chirp/drivers/__pycache__/radtel_t18.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/retevis_rt23.cpython-38.pyc b/chirp/drivers/__pycache__/retevis_rt23.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..bb967c6 --- /dev/null +++ b/chirp/drivers/__pycache__/retevis_rt23.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/tdxone_tdq8a.cpython-38.pyc b/chirp/drivers/__pycache__/tdxone_tdq8a.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..bc0461f --- /dev/null +++ b/chirp/drivers/__pycache__/tdxone_tdq8a.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/vxa700.cpython-38.pyc b/chirp/drivers/__pycache__/vxa700.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..bdbd02b --- /dev/null +++ b/chirp/drivers/__pycache__/vxa700.cpython-38.pyc diff --git a/chirp/drivers/alinco.py b/chirp/drivers/alinco.py index 54d8ce3..747a176 100644 --- a/chirp/drivers/alinco.py +++ b/chirp/drivers/alinco.py @@ -199,7 +199,7 @@ class AlincoStyleRadio(chirp_common.CloneModeRadio): self._mmap = self._download(self._memsize) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) self.process_mmap() @@ -208,7 +208,7 @@ class AlincoStyleRadio(chirp_common.CloneModeRadio): self._upload(self._memsize) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) def get_raw_memory(self, number): diff --git a/chirp/drivers/ft2900.py b/chirp/drivers/ft2900.py index a7ad33d..23f2d22 100644 --- a/chirp/drivers/ft2900.py +++ b/chirp/drivers/ft2900.py @@ -537,7 +537,7 @@ class FT2900Radio(YaesuCloneModeRadio): self._mmap = _download(self) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) LOG.info("Downloaded in %.2f sec" % (time.time() - start)) self.process_mmap() @@ -549,7 +549,7 @@ class FT2900Radio(YaesuCloneModeRadio): _upload(self) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) LOG.info("Uploaded in %.2f sec" % (time.time() - start)) @@ -1210,7 +1210,7 @@ class FT2900Radio(YaesuCloneModeRadio): setattr(_settings, name, value) LOG.debug("Setting %s: %s" % (name, value)) - except Exception, e: + except (Exception, e): LOG.debug(element.get_name()) raise diff --git a/chirp/drivers/kguv8dplus.py b/chirp/drivers/kguv8dplus.py index b4a0cb8..0eb523b 100644 --- a/chirp/drivers/kguv8dplus.py +++ b/chirp/drivers/kguv8dplus.py @@ -418,7 +418,7 @@ class KGUV8DPlusRadio(chirp_common.CloneModeRadio, self._mmap = self._download() except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) self.process_mmap() @@ -435,7 +435,7 @@ class KGUV8DPlusRadio(chirp_common.CloneModeRadio, return self._do_download(0, 32768, 64) except errors.RadioError: raise - except Exception, e: + except (Exception, e): LOG.exception('Unknown error during download process') raise errors.RadioError("Failed to communicate with radio: %s" % e) @@ -467,7 +467,7 @@ class KGUV8DPlusRadio(chirp_common.CloneModeRadio, self._do_upload(0, 32768, 64) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) return @@ -1103,9 +1103,9 @@ class KGUV8DPlusRadio(chirp_common.CloneModeRadio, setattr(obj, setting, int(element.value)/10) else: setattr(obj, setting, element.value) - except Exception, e: + except (Exception, e): LOG.debug(element.get_name()) raise def _is_freq(self, element): - return "rxfreq" in element.get_name() or "txoffset" in element.get_name() or "rx_start" in element.get_name() or "rx_stop" in element.get_name() or "tx_start" in element.get_name() or "tx_stop" in element.get_name()
\ No newline at end of file + return "rxfreq" in element.get_name() or "txoffset" in element.get_name() or "rx_start" in element.get_name() or "rx_stop" in element.get_name() or "tx_start" in element.get_name() or "tx_stop" in element.get_name() diff --git a/chirp/drivers/puxing.py b/chirp/drivers/puxing.py index fb10d6b..9eb25f6 100644 --- a/chirp/drivers/puxing.py +++ b/chirp/drivers/puxing.py @@ -47,7 +47,7 @@ def puxing_prep(radio): for _i in range(0, 10): try: return _puxing_prep(radio) - except Exception, e: + except (Exception, e): time.sleep(1) raise e @@ -60,7 +60,7 @@ def puxing_download(radio): return do_download(radio, 0x0000, 0x0C60, 0x0008) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) @@ -71,7 +71,7 @@ def puxing_upload(radio): return do_upload(radio, 0x0000, 0x0C40, 0x0008) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) POWER_LEVELS = [chirp_common.PowerLevel("High", watts=5.00), @@ -372,7 +372,7 @@ def puxing_2r_download(radio): return do_download(radio, 0x0000, 0x0FE0, 0x0010) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) @@ -383,7 +383,7 @@ def puxing_2r_upload(radio): return do_upload(radio, 0x0000, 0x0FE0, 0x0010) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) PUXING_2R_MEM_FORMAT = """ diff --git a/chirp/drivers/radtel_t18.py b/chirp/drivers/radtel_t18.py index b5eea5c..acd8776 100644 --- a/chirp/drivers/radtel_t18.py +++ b/chirp/drivers/radtel_t18.py @@ -478,7 +478,7 @@ class T18Radio(chirp_common.CloneModeRadio): else: LOG.debug("Setting %s = %s" % (setting, element.value)) setattr(obj, setting, element.value) - except Exception, e: + except (Exception, e): LOG.debug(element.get_name()) raise diff --git a/chirp/drivers/retevis_rt23.py b/chirp/drivers/retevis_rt23.py index d424131..6398875 100644 --- a/chirp/drivers/retevis_rt23.py +++ b/chirp/drivers/retevis_rt23.py @@ -846,7 +846,7 @@ class RT23Radio(chirp_common.CloneModeRadio): elif element.value.get_mutable(): LOG.debug("Setting %s = %s" % (setting, element.value)) setattr(obj, setting, element.value) - except Exception, e: + except (Exception, e): LOG.debug(element.get_name()) raise diff --git a/chirp/drivers/rfinder.py b/chirp/drivers/rfinder.py index cedf835..b0a77bd 100644 --- a/chirp/drivers/rfinder.py +++ b/chirp/drivers/rfinder.py @@ -240,7 +240,7 @@ class RFinderParser: dist = distance(self.__lat, self.__lon, lat, lon) bear = fuzzy_to(self.__lat, self.__lon, lat, lon) mem.comment = "(%imi %s) %s" % (dist, bear, mem.comment) - except Exception, e: + except (Exception, e): LOG.error("Failed to calculate distance: %s" % e) return mem @@ -258,7 +258,7 @@ class RFinderParser: mem.number = number number += 1 self.__memories.append(mem) - except Exception, e: + except (Exception, e): import traceback LOG.error(traceback.format_exc()) LOG.error("Error in received data, cannot continue") diff --git a/chirp/drivers/tdxone_tdq8a.py b/chirp/drivers/tdxone_tdq8a.py index 6793a9f..68c8348 100644 --- a/chirp/drivers/tdxone_tdq8a.py +++ b/chirp/drivers/tdxone_tdq8a.py @@ -301,8 +301,8 @@ def _ident_radio(radio): try: data = _do_ident(radio, magic) return data - except errors.RadioError, e: - print e + except (errors.RadioError, e): + print (e) error = e time.sleep(2) if error: @@ -426,7 +426,7 @@ def model_match(cls, data): if len(data) == 0x2008: rid = data[0x2000:0x2008] - print rid + print (rid) return rid.startswith(cls.MODEL) else: return False @@ -1117,7 +1117,7 @@ class TDXoneTDQ8A(chirp_common.CloneModeRadio, elif element.value.get_mutable(): LOG.debug("Setting %s = %s" % (setting, element.value)) setattr(obj, setting, element.value) - except Exception, e: + except (Exception, e): LOG.debug(element.get_name()) raise @@ -1131,7 +1131,7 @@ class TDXoneTDQ8A(chirp_common.CloneModeRadio, value = int(val.get_value() * 10) LOG.debug("Setting fm_presets = %s" % (value)) self._memobj.fm_presets = value - except Exception, e: + except (Exception, e): LOG.debug(element.get_name()) raise diff --git a/chirp/drivers/vxa700.py b/chirp/drivers/vxa700.py index 87aeaa0..846d406 100644 --- a/chirp/drivers/vxa700.py +++ b/chirp/drivers/vxa700.py @@ -177,7 +177,7 @@ class VXA700Radio(chirp_common.CloneModeRadio): self._mmap = _download(self) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate " + "with the radio: %s" % e) self.process_mmap() @@ -192,7 +192,7 @@ class VXA700Radio(chirp_common.CloneModeRadio): _upload(self) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate " + "with the radio: %s" % e) |
