summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Hibberd <d@vehibberd.com>2023-10-28 15:08:19 +0100
committerDave Hibberd <d@vehibberd.com>2023-10-28 15:31:45 +0100
commitea27c46f7e327039ebb23a7a9ff9e750bae0d01c (patch)
tree3870bde5dc3a44ebffcecc584e6374e5307134d6
parent185139a27eeb9f08ea7f507a5ccfcae6addac692 (diff)
Tidy up the repo, move things to correct places
-rw-r--r--debian/install2
-rw-r--r--debian/patches/01-fix-manifest.patch27
-rw-r--r--debian/patches/02-fix-setup-py.patch11
-rw-r--r--debian/patches/04-remove-redundant-license.patch14
-rw-r--r--debian/patches/05-manpage-updates.patch61
-rw-r--r--debian/patches/99.patch338
-rw-r--r--debian/patches/py3232
-rw-r--r--debian/patches/wxui-chirp-share.patch6
8 files changed, 20 insertions, 671 deletions
diff --git a/debian/install b/debian/install
index ac775ce..d2033f8 100644
--- a/debian/install
+++ b/debian/install
@@ -1,4 +1,4 @@
chirp/share/chirp.png /usr/share/pixmaps
chirp/share/chirp.desktop /usr/share/applications
-chirp/share/* /usr/lib/python3/dist-packages/chirp/share
+chirp/share/*.png /usr/share/chirp
chirp/locale/* /usr/lib/python3/dist-packages/chirp/locale
diff --git a/debian/patches/01-fix-manifest.patch b/debian/patches/01-fix-manifest.patch
index 4ded6f9..3f93f27 100644
--- a/debian/patches/01-fix-manifest.patch
+++ b/debian/patches/01-fix-manifest.patch
@@ -1,11 +1,16 @@
-Description: Add required pieces to MANIFEST.IN file
-Author: Steve Conklin <steve@conklinhouse.com>
-
---- /dev/null
-+++ b/MANIFEST.IN
-@@ -0,0 +1,5 @@
-+include *.xsd
-+include share/*.desktop
-+include share/chirp.png
-+include share/*.1
-+include stock_configs/*
+--- a/MANIFEST.in
++++ b/MANIFEST.in
+@@ -1,8 +1,8 @@
+-include chirp/share/*.desktop
+-include chirp/share/*.png
+-include chirp/share/*.svg
+-include chirp/share/*.ico
+-include chirp/share/*.1
++exclude chirp/share/*.desktop
++exclude chirp/share/*.png
++exclude chirp/share/*.svg
++exclude chirp/share/*.ico
++exclude chirp/share/*.1
+ include chirp/stock_configs/*
+ include chirp/locale/*/LC_MESSAGES/*.mo
+ exclude chirp/locale/*
diff --git a/debian/patches/02-fix-setup-py.patch b/debian/patches/02-fix-setup-py.patch
deleted file mode 100644
index ff226c6..0000000
--- a/debian/patches/02-fix-setup-py.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/setup.py
-+++ b/setup.py
-@@ -130,7 +130,7 @@ def default_build():
- packages=["chirp", "chirp.drivers", "chirp.ui", "tests", "tests.unit",
- "chirp.wxui"],
- version=CHIRP_VERSION,
-- scripts=["chirpw", "rpttool", "chirpwx.py"],
-+ scripts=["chirpwx.py"],
- data_files=[('share/applications', desktop_files),
- ('share/chirp/images', image_files),
- ('share/chirp', xsd_files),
diff --git a/debian/patches/04-remove-redundant-license.patch b/debian/patches/04-remove-redundant-license.patch
deleted file mode 100644
index bac537f..0000000
--- a/debian/patches/04-remove-redundant-license.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: The author includes a copy of the Copyright,
- but it's not needed as it's the same as one we can reference.
-Author: Steve Conklin <steve@conklinhouse.com>
-
---- a/setup.py
-+++ b/setup.py
-@@ -129,7 +129,6 @@
- data_files=[('share/applications', desktop_files),
- ('share/chirp/images', image_files),
- ('share/chirp', xsd_files),
-- ('share/doc/chirp', ['COPYING']),
- ('share/pixmaps', ['share/chirp.png']),
- ('share/man/man1', ["share/chirpw.1"]),
- ('share/chirp/stock_configs', stock_configs),
diff --git a/debian/patches/05-manpage-updates.patch b/debian/patches/05-manpage-updates.patch
deleted file mode 100644
index 42ccfdc..0000000
--- a/debian/patches/05-manpage-updates.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Author: Iain R. Learmonth <irl@debian.org>
-Last-Update: 2016-04-15
-Description: Updates to the man page for new CLI options available.
-
-Index: chirp/share/chirpw.1
-===================================================================
---- chirp.orig/share/chirpw.1
-+++ chirp/share/chirpw.1
-@@ -2,7 +2,7 @@
- .\" First parameter, NAME, should be all caps
- .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
- .\" other parameters are allowed: see man(7), man(1)
--.TH CHIRP 1 "February 12, 2011"
-+.TH CHIRP 1 "April 28, 2016"
- .\" Please adjust this date whenever revising the manpage.
- .\"
- .\" Some roff macros, for reference:
-@@ -19,7 +19,7 @@
- chirpw \- A tool for programming two-way radio equipment
- .SH SYNOPSIS
- .B chirpw
--.RI [ options ]
-+.RI [ options ][ file ]
- .br
- .SH DESCRIPTION
- This manual page documents briefly the
-@@ -37,10 +37,32 @@ A summary of options is included below.
- .B \-\-help
- Show summary of options.
- .TP
-+.B \-h, \-\-help
-+Show summary of options.
-+.TP
-+.B \--version
-+Print version and exit
-+.TP
- .B \-\-profile
- Enable Profiling.
-+.TP
-+.B \-\-quiet
-+Decrease verbosity
-+.TP
-+.B \-v, \-\-verbose
-+Increase verbosity
-+.TP
-+.B \-\-log LOG_FILE
-+Log messages to a file
-+.TP
-+.B \-\-log-level LOG_LEVEL
-+Log file verbosity (critical, error, warn, info, debug). Defaults to 'debug'.
-+.TP
-+.B FILE
-+Loads the specified configuration file. Accepted formats: .csv, .eve, .hmk, .itm, .icf, .tpe, .vx5 and .vx7.
- .SH AUTHOR
- chirpw was written by Dan Smith.
- .PP
--This manual page was written by Dan Smith (with help from Steve Conklin),
--for the Debian project (and may be used by others).
-+This manual page was written by Dan Smith (with help from Steve Conklin) and
-+updated by Iain R. Learmonth, for the Debian project (and may be used by
-+others).
diff --git a/debian/patches/99.patch b/debian/patches/99.patch
deleted file mode 100644
index 7c70ade..0000000
--- a/debian/patches/99.patch
+++ /dev/null
@@ -1,338 +0,0 @@
-From 83fcd463f0c613d04dddb997891e289213b69f01 Mon Sep 17 00:00:00 2001
-From: Apostolos Kefalas <akef@freemail.gr>
-Date: Sat, 5 Nov 2022 17:50:37 +0200
-Subject: [PATCH 1/3] Fix registration, invalid syntax of ap510 driver
-
----
- chirp/drivers/ap510.py | 19 ++++++++++---------
- tests/Python3_Driver_Testing.md | 7 ++++---
- 2 files changed, 14 insertions(+), 12 deletions(-)
-
---- a/chirp/drivers/ap510.py
-+++ b/chirp/drivers/ap510.py
-@@ -44,7 +44,7 @@ def decode_base100(u16):
-
- def drain(pipe):
- """Chew up any data waiting on @pipe"""
-- for x in xrange(3):
-+ for x in range(3):
- buf = pipe.read(4096)
- if not buf:
- return
-@@ -53,7 +53,7 @@ def drain(pipe):
-
- def enter_setup(pipe):
- """Put AP510 in configuration mode."""
-- for x in xrange(30):
-+ for x in range(30):
- if x % 2:
- pipe.write("@SETUP")
- else:
-@@ -84,7 +84,7 @@ def download(radio):
- radio.pipe.write("@DISP")
- buf = ""
-
-- for status.cur in xrange(status.cur, status.max):
-+ for status.cur in range(status.cur, status.max):
- buf += radio.pipe.read(1024)
- if buf.endswith("\r\n"):
- status.cur = status.max
-@@ -242,7 +242,7 @@ class AP510Memory(object):
-
- class AP510Memory20141215(AP510Memory):
- """Compatible with firmware version 20141215"""
-- ATTR_MAP = dict(AP510Memory.ATTR_MAP.items() + {
-+ ATTR_MAP = dict(list(AP510Memory.ATTR_MAP.items()) + list({
- 'tx_volume': '21', # 1-6
- 'rx_volume': '22', # 1-9
- 'tx_power': '23', # 1: 1 watt, 0: 0.5 watt
-@@ -252,7 +252,7 @@ class AP510Memory20141215(AP510Memory):
- 'path3': '27', # like "WIDE1 1" else "0"
- 'multiple': '28',
- 'auto_on': '29',
-- }.items())
-+ }.items()))
-
- def get_multiple(self):
- return dict(zip(
-@@ -343,13 +343,14 @@ RP_IMMUTABLE = ["number", "skip", "bank"
- "offset", "mode", "tuning_step", "bank_index"]
-
-
-+@directory.register
- class AP510Radio(chirp_common.CloneModeRadio):
- """Sainsonic AP510"""
- BAUD_RATE = 9600
- VENDOR = "Sainsonic"
- MODEL = "AP510"
-
-- _model = "AVRT5"
-+ _model = b"AVRT5"
- mem_upper_limit = 0
-
- def get_features(self):
-@@ -380,7 +381,7 @@ class AP510Radio(chirp_common.CloneModeR
- data = download(self)
- except errors.RadioError:
- raise
-- except Exception, e:
-+ except Exception as e:
- raise errors.RadioError("Failed to communicate with radio: %s" % e)
-
- # _mmap isn't a Chirp MemoryMap, but since AP510Memory implements
-@@ -398,7 +399,7 @@ class AP510Radio(chirp_common.CloneModeR
- upload(self)
- except errors.RadioError:
- raise
-- except Exception, e:
-+ except Exception as e:
- raise errors.RadioError("Failed to communicate with radio: %s" % e)
-
- def load_mmap(self, filename):
-@@ -804,4 +805,4 @@ class AP510Radio(chirp_common.CloneModeR
-
- @classmethod
- def match_model(cls, filedata, filename):
-- return filedata.startswith('\r\n00=' + cls._model)
-+ return filedata.startswith(b'\r\n00=' + cls._model)
---- a/tests/Python3_Driver_Testing.md
-+++ b/tests/Python3_Driver_Testing.md
-@@ -263,6 +263,7 @@
- | <a name="Retevis_RT95_VOX"></a> Retevis_RT95_VOX | | | Yes |
- | <a name="Retevis_RT98"></a> Retevis_RT98 | | | |
- | <a name="Rugged_RH5R-V2"></a> Rugged_RH5R-V2 | | | |
-+| <a name="Sainsonic_AP510"></a> Sainsonic_AP510 | | | |
- | <a name="TDXone_TD-Q8A"></a> TDXone_TD-Q8A | | | |
- | <a name="TIDRADIO_TD-H6"></a> TIDRADIO_TD-H6 | [@kk7ds](https://github.com/kk7ds) | 21-Oct-2022 | Yes |
- | <a name="TID_TD-M8"></a> TID_TD-M8 | | | |
-@@ -293,10 +294,12 @@
- | <a name="Wouxun_KG-UV9D_Plus"></a> Wouxun_KG-UV9D_Plus | | | |
- | <a name="Yaesu_FT-1500M"></a> Yaesu_FT-1500M | | | Yes |
- | <a name="Yaesu_FT-1802M"></a> Yaesu_FT-1802M | | | Yes |
-+| <a name="Yaesu_FT-1D_R"></a> Yaesu_FT-1D_R | | | Yes |
- | <a name="Yaesu_FT-25R"></a> Yaesu_FT-25R | | | Yes |
- | <a name="Yaesu_FT-2800M"></a> Yaesu_FT-2800M | | | Yes |
- | <a name="Yaesu_FT-2900R_1900R"></a> Yaesu_FT-2900R_1900R | | | Yes |
- | <a name="Yaesu_FT-2900R_1900RTXMod_Opened_Xmit"></a> Yaesu_FT-2900R_1900RTXMod_Opened_Xmit | | | Yes |
-+| <a name="Yaesu_FT-450D"></a> Yaesu_FT-450D | | | Yes |
- | <a name="Yaesu_FT-4VR"></a> Yaesu_FT-4VR | | | Yes |
- | <a name="Yaesu_FT-4XE"></a> Yaesu_FT-4XE | | | Yes |
- | <a name="Yaesu_FT-4XR"></a> Yaesu_FT-4XR | | | Yes |
-@@ -318,7 +321,12 @@
- | <a name="Yaesu_FT-8800"></a> Yaesu_FT-8800 | [@kk7ds](https://github.com/kk7ds) | 24-Oct-2022 | Yes |
- | <a name="Yaesu_FT-8900"></a> Yaesu_FT-8900 | | | Yes |
- | <a name="Yaesu_FT-90"></a> Yaesu_FT-90 | | | Yes |
-+| <a name="Yaesu_FT2D_R"></a> Yaesu_FT2D_R | | | Yes |
-+| <a name="Yaesu_FT2D_Rv2"></a> Yaesu_FT2D_Rv2 | | | Yes |
-+| <a name="Yaesu_FT3D_R"></a> Yaesu_FT3D_R | | | Yes |
-+| <a name="Yaesu_FTM-3200D_R"></a> Yaesu_FTM-3200D_R | | | Yes |
- | <a name="Yaesu_FTM-350"></a> Yaesu_FTM-350 | | | Yes |
-+| <a name="Yaesu_FTM-7250D_R"></a> Yaesu_FTM-7250D_R | | | Yes |
- | <a name="Yaesu_VX-170"></a> Yaesu_VX-170 | | | Yes |
- | <a name="Yaesu_VX-2"></a> Yaesu_VX-2 | | | Yes |
- | <a name="Yaesu_VX-3"></a> Yaesu_VX-3 | [@kk7ds](https://github.com/kk7ds) | 15-Feb-2019 | Yes |
---- a/chirp/drivers/ft1d.py
-+++ b/chirp/drivers/ft1d.py
-@@ -558,7 +558,7 @@ class FT1Radio(yaesu_clone.YaesuCloneMod
- MODEL = "FT-1D"
- VARIANT = "R"
-
-- _model = "AH44M"
-+ _model = b"AH44M"
- _memsize = 130507
- _block_lengths = [10, 130497]
- _block_size = 32
-@@ -698,7 +698,7 @@ class FT1Radio(yaesu_clone.YaesuCloneMod
-
- @staticmethod
- def _add_ff_pad(val, length):
-- return val.ljust(length, "\xFF")[:length]
-+ return val.ljust(length, b"\xFF")[:length]
-
- @classmethod
- def _strip_ff_pads(cls, messages):
-@@ -740,7 +740,8 @@ class FT1Radio(yaesu_clone.YaesuCloneMod
- return str(mem.label).rstrip("\xFF").translate(charset)
-
- def _encode_label(self, mem):
-- label = "".join([chr(CHARSET.index(x)) for x in mem.name.rstrip()])
-+ label = "".join([chr(CHARSET.index(x))
-+ for x in mem.name.rstrip()]).encode()
- return self._add_ff_pad(label, 16)
-
- def _encode_charsetbits(self, mem):
-@@ -820,7 +821,7 @@ class FT1Radio(yaesu_clone.YaesuCloneMod
-
- @classmethod
- def _wipe_memory(cls, mem):
-- mem.set_raw("\x00" * (mem.size() / 8))
-+ mem.set_raw("\x00" * (mem.size() // 8))
- mem.unknown1 = 0x05
-
- def get_bank_model(self):
-@@ -1131,7 +1132,8 @@ class FT1Radio(yaesu_clone.YaesuCloneMod
- checksum = body[-2:]
- body = ''.join(s for s in body[:-2]
- if s in string.printable).translate(
-- None, "\x09\x0a\x0b\x0c\x0d")
-+ str.maketrans(
-+ "", "", "\x09\x0a\x0b\x0c\x0d"))
- try:
- val = RadioSettingValueString(0, 134, body.strip())
- except Exception as e:
-@@ -1890,7 +1892,7 @@ class FT1Radio(yaesu_clone.YaesuCloneMod
- except AttributeError as e:
- LOG.error("Setting %s is not in the memory map: %s" %
- (element.get_name(), e))
-- except Exception, e:
-+ except Exception as e:
- LOG.debug(element.get_name())
- raise
-
---- a/chirp/drivers/ft2d.py
-+++ b/chirp/drivers/ft2d.py
-@@ -117,7 +117,7 @@ class FT2D(ft1d.FT1Radio):
- return mem
-
- def _decode_label(self, mem):
-- return str(mem.label).rstrip("\xFF").decode('ascii', 'replace')
-+ return str(mem.label).rstrip("\xFF")
-
- def _encode_label(self, mem):
- label = mem.name.rstrip().encode('ascii', 'ignore')
---- a/chirp/drivers/ftm3200d.py
-+++ b/chirp/drivers/ftm3200d.py
-@@ -124,7 +124,7 @@ class FTM3200Radio(ft1d.FT1Radio):
-
- def _decode_label(self, mem):
- # TODO preserve the unknown \x80-x86 chars?
-- return str(mem.label).rstrip("\xFF").decode('ascii', 'replace')
-+ return str(mem.label).rstrip("\xFF")
-
- def _encode_label(self, mem):
- label = mem.name.rstrip().encode('ascii', 'ignore')
-@@ -193,7 +193,7 @@ class FTM3200Radio(ft1d.FT1Radio):
-
- @classmethod
- def _wipe_memory(cls, mem):
-- mem.set_raw("\x00" * (mem.size() / 8))
-+ mem.set_raw("\x00" * (mem.size() // 8))
-
- def sync_out(self):
- # Need to give enough time for the radio to ACK after writes
---- a/chirp/drivers/ftm7250d.py
-+++ b/chirp/drivers/ftm7250d.py
-@@ -125,7 +125,7 @@ class FTM7250Radio(ft1d.FT1Radio):
-
- def _decode_label(self, mem):
- # TODO preserve the unknown \x80-x86 chars?
-- return str(mem.label).rstrip("\xFF").decode('ascii', 'replace')
-+ return str(mem.label).rstrip("\xFF")
-
- def _encode_label(self, mem):
- label = mem.name.rstrip().encode('ascii', 'ignore')
-@@ -194,7 +194,7 @@ class FTM7250Radio(ft1d.FT1Radio):
-
- @classmethod
- def _wipe_memory(cls, mem):
-- mem.set_raw("\x00" * (mem.size() / 8))
-+ mem.set_raw("\x00" * (mem.size() // 8))
-
- def sync_out(self):
- # Need to give enough time for the radio to ACK after writes
---- a/tests/py3_remaining.txt
-+++ b/tests/py3_remaining.txt
-@@ -9,9 +9,3 @@ Wouxun_KG-816.img
- Wouxun_KG-818.img
- Wouxun_KG-UV6.img
- Wouxun_KG-UVD1P.img
--Yaesu_FT-1D_R.img
--Yaesu_FT2D_R.img
--Yaesu_FT3D_R.img
--Yaesu_FT-450D.img
--Yaesu_FTM-3200D_R.img
--Yaesu_FTM-7250D_R.img
---- a/chirp/drivers/ft450d.py
-+++ b/chirp/drivers/ft450d.py
-@@ -305,8 +305,8 @@ class FT450DRadio(yaesu_clone.YaesuClone
- struct mem_struct current;
-
- """
-- _CALLSIGN_CHARSET = [chr(x) for x in range(ord("0"), ord("9") + 1) +
-- range(ord("A"), ord("Z") + 1) + [ord(" ")]]
-+ _CALLSIGN_CHARSET = [chr(x) for x in list(range(ord("0"), ord("9") + 1)) +
-+ list(range(ord("A"), ord("Z") + 1)) + [ord(" ")]]
- _CALLSIGN_CHARSET_REV = dict(zip(_CALLSIGN_CHARSET,
- range(0, len(_CALLSIGN_CHARSET))))
-
-@@ -500,7 +500,7 @@ class FT450DRadio(yaesu_clone.YaesuClone
- self._mmap = self._clone_in()
- except errors.RadioError:
- raise
-- except Exception, e:
-+ except Exception as e:
- raise errors.RadioError("Failed to communicate with radio: %s"
- % e)
- self.process_mmap()
-@@ -510,7 +510,7 @@ class FT450DRadio(yaesu_clone.YaesuClone
- self._clone_out()
- except errors.RadioError:
- raise
-- except Exception, e:
-+ except Exception as e:
- raise errors.RadioError("Failed to communicate with radio: %s"
- % e)
-
-@@ -705,18 +705,18 @@ class FT450DRadio(yaesu_clone.YaesuClone
- if mem.number == 1:
- raise Exception("Sorry, can't delete first memory")
- if wasvalid and not wasused:
-- self._memobj.filled[(mem.number - 1) / 8] &= \
-+ self._memobj.filled[(mem.number - 1) // 8] &= \
- ~(1 << (mem.number - 1) % 8)
-- _mem.set_raw("\xFF" * (_mem.size() / 8)) # clean up
-- self._memobj.visible[(mem.number - 1) / 8] &= \
-+ _mem.set_raw("\xFF" * (_mem.size() // 8)) # clean up
-+ self._memobj.visible[(mem.number - 1) // 8] &= \
- ~(1 << (mem.number - 1) % 8)
- return
- if not wasvalid:
-- _mem.set_raw("\x00" * (_mem.size() / 8)) # clean up
-+ _mem.set_raw("\x00" * (_mem.size() // 8)) # clean up
-
-- self._memobj.visible[(mem.number - 1) / 8] |= 1 << (mem.number - 1) \
-+ self._memobj.visible[(mem.number - 1) // 8] |= 1 << (mem.number - 1) \
- % 8
-- self._memobj.filled[(mem.number - 1) / 8] |= 1 << (mem.number - 1) \
-+ self._memobj.filled[(mem.number - 1) // 8] |= 1 << (mem.number - 1) \
- % 8
- self._set_memory(mem, _mem)
-
-@@ -945,7 +945,7 @@ class FT450DRadio(yaesu_clone.YaesuClone
- """Match the opened/downloaded image to the correct version"""
- if len(filedata) == cls.MEM_SIZE + 7: # +7 bytes of model name
- rid = filedata[cls.MEM_SIZE:cls.MEM_SIZE + 7]
-- if rid.startswith(cls.MODEL):
-+ if rid.startswith(cls.MODEL.encode()):
- return True
- else:
- return False
-@@ -959,8 +959,8 @@ class FT450DRadio(yaesu_clone.YaesuClone
- def _chars2str(self, cary, knt):
- """Convert raw memory char array to a string: NOT a callback."""
- stx = ""
-- for char in cary[:knt]:
-- stx += chr(char)
-+ for char in cary[0:knt]:
-+ stx += chr(int(char))
- return stx
-
- def _my_str2ary(self, setting, obj, atrba, knt):
-@@ -1490,6 +1490,6 @@ class FT450DRadio(yaesu_clone.YaesuClone
- elif element.value.get_mutable():
- LOG.debug("Setting %s = %s" % (setting, element.value))
- setattr(obj, setting, element.value)
-- except Exception, e:
-+ except Exception as e:
- LOG.debug(element.get_name())
- raise
diff --git a/debian/patches/py3 b/debian/patches/py3
deleted file mode 100644
index d968180..0000000
--- a/debian/patches/py3
+++ /dev/null
@@ -1,232 +0,0 @@
---- a/chirp/drivers/bj9900.py
-+++ b/chirp/drivers/bj9900.py
-@@ -178,7 +178,7 @@ class BJ9900Radio(chirp_common.CloneMode
- self._mmap = self._clone_in()
- except errors.RadioError:
- raise
-- except Exception, e:
-+ except Exception as e:
- raise errors.RadioError("Failed to communicate with radio: %s" % e)
- self.process_mmap()
-
-@@ -187,7 +187,7 @@ class BJ9900Radio(chirp_common.CloneMode
- self._clone_out()
- except errors.RadioError:
- raise
-- except Exception, e:
-+ except Exception as e:
- raise errors.RadioError("Failed to communicate with radio: %s" % e)
-
- def process_mmap(self):
---- a/chirp/drivers/lt725uv.py
-+++ b/chirp/drivers/lt725uv.py
-@@ -1547,7 +1547,7 @@ class LT725UV(chirp_common.CloneModeRadi
- elif element.value.get_mutable():
- LOG.debug("Setting %s = %s" % (setting, element.value))
- setattr(obj, setting, element.value)
-- except Exception, e:
-+ except Exception as e:
- LOG.debug(element.get_name())
- raise
-
---- 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 as 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 as 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 as 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 as 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 as e:
- raise errors.RadioError("Failed to communicate with radio: %s" % e)
-
- PUXING_2R_MEM_FORMAT = """
---- a/chirp/drivers/rfinder.py
-+++ b/chirp/drivers/rfinder.py
-@@ -236,7 +236,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 as e:
- LOG.error("Failed to calculate distance: %s" % e)
-
- return mem
-@@ -254,7 +254,7 @@ class RFinderParser:
- mem.number = number
- number += 1
- self.__memories.append(mem)
-- except Exception, e:
-+ except Exception as e:
- import traceback
- LOG.error(traceback.format_exc())
- LOG.error("Error in received data, cannot continue")
-@@ -283,8 +283,9 @@ class RFinderRadio(chirp_common.NetworkS
-
- self._rfp = None
-
-- def set_params(self, (lat, lon), miles, email, password):
-+ def set_params(self, ll, miles, email, password):
- """Sets the parameters to use for the query"""
-+ lat, lon = ll
- self._lat = lat
- self._lon = lon
- self._miles = miles
---- a/chirp/drivers/wouxun.py
-+++ b/chirp/drivers/wouxun.py
-@@ -274,7 +274,7 @@ class KGUVD1PRadio(chirp_common.CloneMod
- return do_download(self, 0x0000, 0x2000, 0x0040)
- except errors.RadioError:
- raise
-- except Exception, e:
-+ except Exception as e:
- raise errors.RadioError("Failed to communicate with radio: %s" % e)
-
- def _upload(self):
-@@ -285,7 +285,7 @@ class KGUVD1PRadio(chirp_common.CloneMod
- return do_upload(self, 0x0000, 0x2000, 0x0010)
- except errors.RadioError:
- raise
-- except Exception, e:
-+ except Exception as e:
- raise errors.RadioError("Failed to communicate with radio: %s" % e)
-
- def sync_in(self):
-@@ -658,7 +658,7 @@ class KGUVD1PRadio(chirp_common.CloneMod
- else:
- LOG.debug("Setting %s = %s" % (setting, element.value))
- setattr(obj, setting, element.value)
-- except Exception, e:
-+ except Exception as e:
- LOG.debug(element.get_name())
- raise
-
-@@ -680,7 +680,7 @@ class KGUVD1PRadio(chirp_common.CloneMod
- else:
- setting = self._memobj.fm_presets_1
- setting[index] = value
-- except Exception, e:
-+ except Exception as e:
- LOG.debug(element.get_name())
- raise
-
-@@ -690,7 +690,7 @@ class KGUVD1PRadio(chirp_common.CloneMod
- setattr(self._memobj.freq_ranges,
- element.get_name(),
- encode_freq(int(element.value)))
-- except Exception, e:
-+ except Exception as e:
- LOG.debug(element.get_name())
- raise
-
-@@ -1397,7 +1397,7 @@ class KGUV6DRadio(KGUVD1PRadio):
- else:
- LOG.debug("Setting %s = %s" % (setting, element.value))
- setattr(obj, setting, element.value)
-- except Exception, e:
-+ except Exception as e:
- LOG.debug(element.get_name())
- raise
-
-@@ -1419,7 +1419,7 @@ class KGUV6DRadio(KGUVD1PRadio):
- else:
- setting = self._memobj.fm_presets_1
- setting[index] = value
-- except Exception, e:
-+ except Exception as e:
- LOG.debug(element.get_name())
- raise
-
---- a/chirp/ui/mainapp.py
-+++ b/chirp/ui/mainapp.py
-@@ -1434,7 +1434,7 @@ of file.
- radio = radioreference.RadioReferenceRadio(None)
- radio.set_params(zipcode, username, passwd, 'US')
- self.do_open_live(radio, read_only=True)
-- except errors.RadioError, e:
-+ except errors.RadioError as e:
- common.show_error(e)
-
- self.window.set_cursor(None)
---- a/rpttool
-+++ b/rpttool
-@@ -28,7 +28,7 @@ def open_device():
- s = serial.Serial(port="/dev/icom",
- baudrate=idrp.IDRPx000V.BAUD_RATE,
- timeout=0.1)
-- except Exception, e:
-+ except Exception as e:
- print "Unable to open serial port %s: %s" % ("/dev/icom", e)
- return None
-
-@@ -44,7 +44,7 @@ def read_freq():
-
- try:
- mem = rp.get_memory(0)
-- except Exception, e:
-+ except Exception as e:
- print "Unable to read memory from device: %s" % e
- return 0
-
-@@ -56,7 +56,7 @@ def read_freq():
- def _set_freq(rp):
- try:
- mem = rp.get_memory(0)
-- except Exception, e:
-+ except Exception as e:
- print "Unable to read memory from device: %s" % e
- return False
-
-@@ -75,7 +75,7 @@ def _set_freq(rp):
-
- try:
- rp.set_memory(mem)
-- except Exception, e:
-+ except Exception as e:
- print "Failed to set frequency to %s: %s" % \
- (chirp_common.format_freq(mem.freq), e)
- return False
-@@ -92,7 +92,7 @@ def set_freq():
-
- try:
- res = _set_freq(rp)
-- except Exception, e:
-+ except Exception as e:
- print "Unknown error while setting frequency: %s" % e
- res = False
-
diff --git a/debian/patches/wxui-chirp-share.patch b/debian/patches/wxui-chirp-share.patch
index 0403b0b..47cdbaa 100644
--- a/debian/patches/wxui-chirp-share.patch
+++ b/debian/patches/wxui-chirp-share.patch
@@ -9,7 +9,7 @@
- .joinpath('welcome_screen.png')
- ) as welcome:
- bmp = wx.Bitmap(str(welcome))
-+ bmp = wx.Bitmap(str('/usr/lib/python3/dist-packages/chirp/share/welcome_screen.png'))
++ bmp = wx.Bitmap(str('/usr/share/chirp/welcome_screen.png'))
width, height = self.GetSize()
img = wx.StaticBitmap(self, wx.ID_ANY, bmp)
vbox.Add(img, 1, flag=wx.EXPAND)
@@ -22,7 +22,7 @@
- .joinpath('plus-icon.png')
- ) as icon:
- self.add_tab_bm = wx.Bitmap(str(icon), wx.BITMAP_TYPE_ANY)
-+ self.add_tab_bm = wx.Bitmap(str('/usr/lib/python3/dist-packages/chirp/share/plus-icon.png'), wx.BITMAP_TYPE_ANY)
++ self.add_tab_bm = wx.Bitmap(str('/usr/share/chirp/plus-icon.png'), wx.BITMAP_TYPE_ANY)
self.add_tab_panel.Bind(wx.EVT_PAINT, self._paint_add_tab_panel)
@@ -39,7 +39,7 @@
- .joinpath(icon)
- ) as path:
- self.SetIcon(wx.Icon(str(path)))
-+ self.SetIcon(wx.Icon(str('/usr/lib/python3/dist-packages/chirp/share/chirp.png')))
++ self.SetIcon(wx.Icon(str('/usr/share/chirp/chirp.png')))
@property
def current_editorset(self):