[chirp_devel] [PATCH] Fix more string-related errors #495
Alex Page
Sun Jun 14 10:22:43 PDT 2020
# HG changeset patch
# User Alex Page <a.t.page at gmail.com>
# Date 1592155249 14400
# Sun Jun 14 13:20:49 2020 -0400
# Branch py3
# Node ID 628ead8b23cb1b1181e98355e87b1681ce4922ff
# Parent 8831ed2fd44de57b6177ce0d47ebd5530b8f3256
Fix more string-related errors #495
diff --git a/chirp/drivers/uv5r.py b/chirp/drivers/uv5r.py
--- a/chirp/drivers/uv5r.py
+++ b/chirp/drivers/uv5r.py
@@ -587,7 +587,7 @@
data += _read_block(radio, i, 0x40, False)
if append_model:
- data += radio.MODEL.ljust(8)
+ data += radio.MODEL.ljust(8).encode()
LOG.debug("done.")
return memmap.MemoryMapBytes(data)
diff --git a/chirp/drivers/uvb5.py b/chirp/drivers/uvb5.py
--- a/chirp/drivers/uvb5.py
+++ b/chirp/drivers/uvb5.py
@@ -209,7 +209,7 @@
data += (b"\x00" * 16)
firstack = None
for i in range(0, 0x1000, 16):
- frame = struct.pack(">cHB", "R", i, 16)
+ frame = struct.pack(">cHB", b"R", i, 16)
radio.pipe.write(frame)
result = radio.pipe.read(20)
if frame[1:4] != result[1:4]:
More information about the chirp_devel
mailing list