From 03bdaaae6b4b9e7e92e2ddf5f131e4dc1f7dc961 Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Thu, 18 May 2017 20:33:43 -0500 Subject: [PATCH] Rollback change to mk_id_dict --- dmr_utils/utils.py | 13 +++++++++++++ setup.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dmr_utils/utils.py b/dmr_utils/utils.py index f57e6ab..acea56d 100755 --- a/dmr_utils/utils.py +++ b/dmr_utils/utils.py @@ -95,6 +95,19 @@ 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]) + _handle.close + return dict + except IOError: + return dict + +def mk_full_id_dict(_path, _file): + dict = {} + try: + with open(_path+_file, 'rU') as _handle: + ids = csv_reader(_handle, dialect='excel', delimiter=',') + for row in ids: + print(repr(row[0]), repr(row[1]), row[3], row[4]) dict[int(row[0])] = {'CALLSIGN': (row[1]), 'NAME': (row[2]), 'CITY': (row[3]), 'STATE': (row[4]), 'COUNTRY':(row[5])} _handle.close return dict diff --git a/setup.py b/setup.py index 6bd4ce5..285b705 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ def readme(): return file.read() setup(name='dmr_utils', - version='0.1.3', + version='0.1.4', description='ETSI DMR (Digital Mobile Radio) Teir II Utilities', long_description='Modules to disassemble and assemble DMR packets, including generating and decoding varoius FEC routines', classifiers=[