diff --git a/pid/pid.py b/pid/pid.py index c7cacb2..350b9c0 100755 --- a/pid/pid.py +++ b/pid/pid.py @@ -296,8 +296,11 @@ def run(self): modemcfg = cfg.getvalue('modemlist', '[{}]', 'pid') - # convert json to list of dictionary entries - modemlist = json.loads(modemcfg) + try: + # convert json to list of dictionary entries + modemlist = json.loads(modemcfg) + except: + cfg.errorandexit("modemlist - not a valid JSON structure!") # check if modemcfg is set if 'modemid' not in modemlist[0]: