Browse Source

get rid of verbose if

Helge Jung 8 years ago
parent
commit
ae4e0688ab
1 changed files with 1 additions and 4 deletions
  1. 1 4
      ffstatus/alfred.py

+ 1 - 4
ffstatus/alfred.py

@@ -79,10 +79,7 @@ class AlfredParser:
             if len(nodestatic) == 0:
                 print('Warning: ALFRED data for {id} does not contain static data.'.format(id=alfredid))
 
-            if 'node_id' in nodestatic:
-                myid = alfredstatic['node_id']
-            else:
-                myid = alfredid.lower().replace(':', '')
+            myid = nodestatic.get('node_id', alfredid.lower().replace(':', ''))
 
             nodeinfo = {
                 'hostname': None,