From fbc5c636dfc978877503bd67e14bc445edbb6fb6 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sun, 30 Mar 2014 13:19:54 +0200 Subject: [PATCH] alfred.py: ignore non-parseable locations --- alfred.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/alfred.py b/alfred.py index 086ebc7..c92bc12 100755 --- a/alfred.py +++ b/alfred.py @@ -13,7 +13,10 @@ class alfred: for mac,node in alfred_data.items(): node_alias = {} if 'location' in node: - node_alias['gps'] = str(node['location']['latitude']) + ' ' + str(node['location']['longitude']) + try: + node_alias['gps'] = str(node['location']['latitude']) + ' ' + str(node['location']['longitude']) + except: + pass try: node_alias['firmware'] = node['software']['firmware']['release']