[chirp_devel] [PATCH 2 of 3] [csv] Add support for reading CSV generated by RT Systems software. #477

Tom Hayward
Sat Feb 9 14:00:32 PST 2013


On Sat, Feb 9, 2013 at 1:59 PM, Dan Smith <dsmith at danplanet.com> wrote:
>> -    def match_model(cls, _filedata, filename):
>> +    def match_model(cls, filedata, filename):
>>          """Match files ending in .CSV"""
>> -        return filename.lower().endswith("." + cls.FILE_EXTENSION)
>> +        return filename.lower().endswith("." + cls.FILE_EXTENSION)
>> and \
>> +            (filedata.startswith("Location,") or filedata == "")
>
> Hmm, the CSV driver is willing to open empty files?

Yes, I had to add that bit so that File > New would start working again :-)

Tom



More information about the chirp_devel mailing list