mirror of
https://github.com/n0mjs710/dmr_utils3
synced 2025-12-20 23:45:36 +08:00
Improve RadioID file processing
This commit is contained in:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user