Improve RadioID file handling

This commit is contained in:
Cort Buffington 2019-05-08 13:56:58 -05:00
parent 66a082dbb8
commit 6fe0cd1a61

View File

@ -102,6 +102,8 @@ def mk_id_dict(_path, _file):
try:
with open(_path+_file, 'rU') as _handle:
records = jload(_handle)
if 'count' in records:
del records['count']
records = records[records.keys()[0]]
_handle.close
for record in records:
@ -120,6 +122,8 @@ def mk_full_id_dict(_path, _file, _type):
try:
with open(_path+_file, 'rU') as _handle:
records = jload(_handle)
if 'count' in records:
del records['count']
records = records[records.keys()[0]]
_handle.close
if _type == 'peer':