27 Apr
2014
27 Apr
'14
6:23 p.m.
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