[chirp_devel] [csv] Friendlier defaults for missing cToneFreq/rToneFreq columns in csv import - Fixes #1577
Dan Smith
Sun Apr 27 18:23:45 PDT 2014
I don't mean to nitpick, and I know I've ignored this for too long
anyway. However, I don't really like this:
> + def _clean_tmode(self, headers, line, mem):
> + """ If there is exactly one of [rToneFreq, cToneFreq] columns in the
> + csv file, use it for both rtone & ctone. Makes TSQL use friendlier."""
> +
> + if not hasattr(self, "_file_has_rTone"):
> + self._file_has_rTone = "rToneFreq" in headers
> + if not hasattr(self, "_file_has_cTone"):
> + self._file_has_cTone = "cToneFreq" in headers
...because it modifies self in the middle of a method. Would you mind if
we set those in __init__, perhaps just to None, and then set them
True/False when we start the load?
If you don't want to spin it again, I'll just apply as-is and chalk it
up to OCD, but I really think it'd be nicer.
--Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20140427/cd9d3b64/attachment-0001.bin
More information about the chirp_devel
mailing list