diff options
| author | Matthew Poletiek <matthew.poletiek@gmail.com> | 2020-12-10 21:07:55 -0600 |
|---|---|---|
| committer | Matthew Poletiek <matthew.poletiek@gmail.com> | 2020-12-10 21:07:55 -0600 |
| commit | b5bcc537a84c3a5f4be247647159bb18ac8bb260 (patch) | |
| tree | a5c19d7769d8ef26b02ce47615606e573e103a4b | |
| parent | f93c47d45e071791a705cdfa1ec68c4c1e4c3bcd (diff) | |
| download | chirp-b5bcc537a84c3a5f4be247647159bb18ac8bb260.tar.gz chirp-b5bcc537a84c3a5f4be247647159bb18ac8bb260.tar.xz | |
driver syntax fixes
| -rw-r--r-- | chirp/drivers/__pycache__/baofeng_common.cpython-38.pyc | bin | 0 -> 13414 bytes | |||
| -rw-r--r-- | chirp/drivers/__pycache__/bj9900.cpython-38.pyc | bin | 0 -> 10310 bytes | |||
| -rw-r--r-- | chirp/drivers/__pycache__/kguv9dplus.cpython-38.pyc | bin | 0 -> 47445 bytes | |||
| -rw-r--r-- | chirp/drivers/__pycache__/lt725uv.cpython-38.pyc | bin | 0 -> 31381 bytes | |||
| -rw-r--r-- | chirp/drivers/__pycache__/rh5r_v2.cpython-38.pyc | bin | 0 -> 7417 bytes | |||
| -rw-r--r-- | chirp/drivers/__pycache__/tk760g.cpython-38.pyc | bin | 0 -> 40390 bytes | |||
| -rw-r--r-- | chirp/drivers/baofeng_common.py | 10 | ||||
| -rw-r--r-- | chirp/drivers/bj9900.py | 4 | ||||
| -rw-r--r-- | chirp/drivers/kguv9dplus.py | 6 | ||||
| -rw-r--r-- | chirp/drivers/lt725uv.py | 2 | ||||
| -rw-r--r-- | chirp/drivers/rh5r_v2.py | 2 | ||||
| -rw-r--r-- | chirp/drivers/tk760g.py | 2 |
12 files changed, 13 insertions, 13 deletions
diff --git a/chirp/drivers/__pycache__/baofeng_common.cpython-38.pyc b/chirp/drivers/__pycache__/baofeng_common.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..3cc2bb2 --- /dev/null +++ b/chirp/drivers/__pycache__/baofeng_common.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/bj9900.cpython-38.pyc b/chirp/drivers/__pycache__/bj9900.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..26e5d19 --- /dev/null +++ b/chirp/drivers/__pycache__/bj9900.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/kguv9dplus.cpython-38.pyc b/chirp/drivers/__pycache__/kguv9dplus.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..f95fe64 --- /dev/null +++ b/chirp/drivers/__pycache__/kguv9dplus.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/lt725uv.cpython-38.pyc b/chirp/drivers/__pycache__/lt725uv.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..10601bf --- /dev/null +++ b/chirp/drivers/__pycache__/lt725uv.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/rh5r_v2.cpython-38.pyc b/chirp/drivers/__pycache__/rh5r_v2.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..06b5dde --- /dev/null +++ b/chirp/drivers/__pycache__/rh5r_v2.cpython-38.pyc diff --git a/chirp/drivers/__pycache__/tk760g.cpython-38.pyc b/chirp/drivers/__pycache__/tk760g.cpython-38.pyc Binary files differnew file mode 100644 index 0000000..1cda5bf --- /dev/null +++ b/chirp/drivers/__pycache__/tk760g.cpython-38.pyc diff --git a/chirp/drivers/baofeng_common.py b/chirp/drivers/baofeng_common.py index 9a6581c..ed131f2 100644 --- a/chirp/drivers/baofeng_common.py +++ b/chirp/drivers/baofeng_common.py @@ -164,8 +164,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: @@ -336,7 +336,7 @@ class BaofengCommonHT(chirp_common.CloneModeRadio, _upload(self) except errors.RadioError: raise - except Exception, e: + except (Exception, e): # If anything unexpected happens, make sure we raise # a RadioError and log the problem LOG.exception('Unexpected error during upload') @@ -622,7 +622,7 @@ class BaofengCommonHT(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 @@ -636,6 +636,6 @@ class BaofengCommonHT(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/bj9900.py b/chirp/drivers/bj9900.py index ef92d64..aa9a250 100644 --- a/chirp/drivers/bj9900.py +++ b/chirp/drivers/bj9900.py @@ -178,7 +178,7 @@ class BJ9900Radio(chirp_common.CloneModeRadio, self._mmap = self._clone_in() except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) self.process_mmap() @@ -187,7 +187,7 @@ class BJ9900Radio(chirp_common.CloneModeRadio, self._clone_out() except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) def process_mmap(self): diff --git a/chirp/drivers/kguv9dplus.py b/chirp/drivers/kguv9dplus.py index b836af6..4907a1c 100644 --- a/chirp/drivers/kguv9dplus.py +++ b/chirp/drivers/kguv9dplus.py @@ -877,7 +877,7 @@ class KGUV9DPlusRadio(chirp_common.CloneModeRadio, self._write_record(CMD_HANGUP) 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) @@ -894,7 +894,7 @@ class KGUV9DPlusRadio(chirp_common.CloneModeRadio, self._write_record(CMD_HANGUP) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError( "Failed to communicate with radio: %s" % e) return @@ -1887,7 +1887,7 @@ class KGUV9DPlusRadio(chirp_common.CloneModeRadio, setattr(obj, setting, int(element.value)/10) else: setattr(obj, setting, element.value) - except Exception, e: + except (Exception, e): LOG.debug("set_settings: Exception with %s" % element.get_name()) raise diff --git a/chirp/drivers/lt725uv.py b/chirp/drivers/lt725uv.py index a21a9c5..7762e1b 100644 --- a/chirp/drivers/lt725uv.py +++ b/chirp/drivers/lt725uv.py @@ -1393,7 +1393,7 @@ class LT725UV(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/rh5r_v2.py b/chirp/drivers/rh5r_v2.py index 01ffc96..dc7152e 100644 --- a/chirp/drivers/rh5r_v2.py +++ b/chirp/drivers/rh5r_v2.py @@ -167,7 +167,7 @@ class TYTTHUVF8_V2(chirp_common.CloneModeRadio): filedata[0x840:0x848] == cls._FILEID) def process_mmap(self): - print MEM_FORMAT + print (MEM_FORMAT) self._memobj = bitwise.parse(MEM_FORMAT, self._mmap) def get_raw_memory(self, number): diff --git a/chirp/drivers/tk760g.py b/chirp/drivers/tk760g.py index 0f90d5e..f77f9c1 100644 --- a/chirp/drivers/tk760g.py +++ b/chirp/drivers/tk760g.py @@ -907,7 +907,7 @@ class Kenwood_Serie_60G(chirp_common.CloneModeRadio, chirp_common.ExperimentalRa do_upload(self) except errors.RadioError: raise - except Exception, e: + except (Exception, e): raise errors.RadioError("Failed to communicate with radio: %s" % e) def process_mmap(self): |
