alfred.py: remove unused function aliases
This commit is contained in:
parent
9195ea9650
commit
15a0f71847
29
alfred.py
29
alfred.py
|
@ -14,32 +14,3 @@ def statistics():
|
|||
|
||||
def vis():
|
||||
return _fetch(160)
|
||||
|
||||
def aliases():
|
||||
alias = {}
|
||||
for node in nodeinfo():
|
||||
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']
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
node_alias['id'] = node['network']['mac']
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
if 'hostname' in node:
|
||||
node_alias['name'] = node['hostname']
|
||||
elif 'name' in node:
|
||||
node_alias['name'] = node['name']
|
||||
if len(node_alias):
|
||||
alias[node['network']['mac']] = node_alias
|
||||
|
||||
return alias
|
||||
|
|
Loading…
Reference in a new issue