4 Apr
2012
4 Apr
'12
7:13 p.m.
+tx_freq = None +def set_tx_freq(val):
- global tx_freq
- tx_freq = chirp_common.parse_freq(val)
- return None
This makes it non-reentrant, and we can't have that.
if len(header) > len(line):
print "Line %i has %i columns, expected %i" % (lineno,
len(line),
len(header))
self.errors.append("Column number mismatch on line %i" % lineno)
continue
Right here, do this:
tx_freq = None def set_tx_freq(val): tx_freq = chirp_common.parse_freq(val) return None self.ATTR_MAP["Tx Freq."] = (set_tx_freq, "txfreq")
so that it's in place before we do this:
try:
mem = self._parse_csv_data_line(header, [i.replace(',','.') for i in line])
if mem.duplex == "split":
mem.offset = tx_freq
if mem.number is None:
raise Exception("Invalid Location field" % lineno)
Then make sure to avoid modifying the global ATTR_MAP definition:
def __init__(self, *args): self.ATTR_MAP = dict(self.ATTR_MAP) generic_csv.CSVRadio.__init__(self, *args)
Sound okay?
--
Dan Smith
www.danplanet.com
KK7DS