[enh] more robust code

This commit is contained in:
Laurent Peuch 2017-01-30 23:52:05 +01:00
parent 255db43aba
commit 3c8140ca22

View file

@ -203,7 +203,7 @@ for app, info in apps_list.items():
'lastUpdate': timestamp, 'lastUpdate': timestamp,
'manifest': manifest, 'manifest': manifest,
'state': info['state'], 'state': info['state'],
'level': info['level'] 'level': info.get('level', '?')
} }
except KeyError as e: except KeyError as e:
print("-> Error: invalid app info or manifest, %s" % e) print("-> Error: invalid app info or manifest, %s" % e)