Improve RadioID file processing

This commit is contained in:
Cort Buffington 2019-05-08 13:56:12 -05:00
parent 9a3b0fefb9
commit fd72618ef6
1 changed files with 4 additions and 0 deletions

View File

@ -95,6 +95,8 @@ def mk_id_dict(_path, _file):
try:
with open(_path+_file, 'r', encoding='latin1') as _handle:
records = jload(_handle)
if 'count' in [*records]:
records.pop('count')
records = records[[*records][0]]
_handle.close
for record in records:
@ -114,6 +116,8 @@ def mk_full_id_dict(_path, _file, _type):
try:
with open(_path+_file, 'r', encoding='latin1') as _handle:
records = jload(_handle)
if 'count' in [*records]:
records.pop('count')
records = records[[*records][0]]
_handle.close
if _type == 'peer':