From fd72618ef61ea5288923fac9f759d90ccb1abd24 Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Wed, 8 May 2019 13:56:12 -0500 Subject: [PATCH] Improve RadioID file processing --- dmr_utils3/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dmr_utils3/utils.py b/dmr_utils3/utils.py index 3e8db9b..9499eec 100755 --- a/dmr_utils3/utils.py +++ b/dmr_utils3/utils.py @@ -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':