ignore rows in the wrong format
Becuse we can't goddam go longer than a few weeks without someone having to chnage the format of the ID files.
This commit is contained in:
parent
bcee6d60d3
commit
00299e3df3
|
@ -104,7 +104,10 @@ def mk_id_dict(_path, _file):
|
|||
with open(_path+_file, 'rU') as _handle:
|
||||
ids = csv_reader(_handle, dialect='excel', delimiter=',')
|
||||
for row in ids:
|
||||
dict[int(row[0])] = (row[1])
|
||||
try:
|
||||
dict[int(row[0])] = (row[1])
|
||||
except:
|
||||
pass
|
||||
_handle.close
|
||||
return dict
|
||||
except IOError:
|
||||
|
@ -125,7 +128,10 @@ def mk_full_id_dict(_path, _file, _type):
|
|||
ids = csv_dict_reader(_handle, fieldnames=fields, restkey='OTHER', dialect='excel', delimiter=',')
|
||||
for row in ids:
|
||||
for item in row:
|
||||
dict[int(row['ID'])] = row
|
||||
try:
|
||||
dict[int(row['ID'])] = row
|
||||
except:
|
||||
pass
|
||||
_handle.close
|
||||
return dict
|
||||
except IOError:
|
||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ def readme():
|
|||
return file.read()
|
||||
|
||||
setup(name='dmr_utils',
|
||||
version='0.1.15',
|
||||
version='0.1.16',
|
||||
description='ETSI DMR (Digital Mobile Radio) Tier II Utilities',
|
||||
long_description='Modules to disassemble and assemble DMR packets, including generating and decoding various FEC routines',
|
||||
classifiers=[
|
||||
|
|
Loading…
Reference in New Issue