31 Jan
2015
31 Jan
'15
5:31 p.m.
# HG changeset patch User Eric Allen eric@hackerengineer.net Date # 14227542__68 28800 Sat Jan 31 17:31:08 2015 -0800 Node ID # 0ee06737ce8c741e19376dad5d4391307a54aafe Parent # 05767e5dabb45d0a99ca63df5705bc799e1858a3 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 05767e5dabb4 -r 0ee06737ce8c chirp/th_uvf8d.py --- a/chirp/th_uvf8d.pyThu Jan 29 07:24:01 2015 -0600 +++ b/chirp/th_uvf8d.pySat Jan 31 17:31:08 2015 -0800 @@ -386,7 +386,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]