alfred.py: ignore non-parseable locations

rewrite
Nils Schneider 2014-03-30 13:19:54 +02:00
parent d6bd31f8d0
commit fbc5c636df
1 changed files with 4 additions and 1 deletions

View File

@ -13,7 +13,10 @@ class alfred:
for mac,node in alfred_data.items():
node_alias = {}
if 'location' in node:
try:
node_alias['gps'] = str(node['location']['latitude']) + ' ' + str(node['location']['longitude'])
except:
pass
try:
node_alias['firmware'] = node['software']['firmware']['release']