[chirp_devel] [PATCH] [vx5] Filter name on read so non-printable chars don't crash pygtk on OSX. #298

Tom Hayward
Tue Oct 9 13:57:47 PDT 2012


# HG changeset patch
# User Tom Hayward <tom at tomh.us>
# Date 1349816258 21600
# Node ID 775dc3177e0145c3a9cb9bee85fa38f5ebec9d0a
# Parent  3d07647800a1c88409265904d02232dcfded3722
[vx5] Filter name on read so non-printable chars don't crash pygtk on OSX. #298

diff -r 3d07647800a1 -r 775dc3177e01 chirp/vx5.py
--- a/chirp/vx5.py	Sat Oct 06 07:18:48 2012 -0700
+++ b/chirp/vx5.py	Tue Oct 09 14:57:38 2012 -0600
@@ -119,7 +119,7 @@
 
         mem.freq = chirp_common.fix_rounded_step(int(_mem.freq) * 1000)
         mem.duplex = DUPLEX[_mem.duplex]
-        mem.name = str(_mem.name).rstrip()
+        mem.name = self.filter_name(str(_mem.name).rstrip())
         mem.mode = MODES[_mem.mode]
         if mem.mode == "FM" and _mem.half_deviation:
             mem.mode = "NFM"
@@ -181,9 +181,6 @@
         _flg.skip = mem.skip == "S"
         _flg.pskip = mem.skip == "P"
 
-    def filter_name(self, name):
-        return chirp_common.name8(name)
-
     @classmethod
     def match_model(cls, filedata, filename):
         return len(filedata) == cls._memsize



More information about the chirp_devel mailing list