[chirp_devel] [PATCH] Fix skip reading in TH-UVF8D

Eric Allen
Tue Jun 9 15:34:25 PDT 2015


# HG changeset patch
# User Eric Allen <eric at hackerengineer.net>
# Date 1433889261 25200
#      Tue Jun 09 15:34:21 2015 -0700
# Node ID c91b5de727e95efd492aa0a01cc407ae2a59b66a
# Parent  25ce872ec0611c5916dc6f6ccb8576a838f8ae5b
Fix skip reading in TH-UVF8D

Turns out the and/or Python ternary doesn't work when you do "and ''",
because '' is falsey.

diff -r 25ce872ec061 -r c91b5de727e9 chirp/drivers/th_uvf8d.py
--- a/chirp/drivers/th_uvf8d.py	Sat Jun 06 21:49:11 2015 -0400
+++ b/chirp/drivers/th_uvf8d.py	Tue Jun 09 15:34:21 2015 -0700
@@ -397,7 +397,10 @@
 
         mem.name = str(_mem.name).rstrip('\xFF ')
 
-        mem.skip = dont_skip and "" or "S"
+        if dont_skip:
+            mem.skip = ''
+        else:
+            mem.skip = 'S'
 
         mem.mode = _mem.wideband and "FM" or "NFM"
         mem.power = POWER_LEVELS[1 - _mem.ishighpower]



More information about the chirp_devel mailing list