Changeset 8341 in genesis for nodes/get-network-status.py


Ignore:
Timestamp:
Aug 13, 2010, 6:13:18 PM (14 years ago)
Author:
rick
Message:

Test before commit:

  • status array comparison was wrong
  • print not formatted right
File:
1 edited

Legend:

Unmodified
Added
Removed
  • nodes/get-network-status.py

    r8340 r8341  
    318318      new_status = yaml.load(stream)
    319319      for item in ['node', 'link']:
    320         for key, value in status[item].iteritems():
     320        for key, value in new_status[item].iteritems():
    321321          if not status[item].has_key(key):
    322322            # New items always welcome
    323323            status[item][key] = value
    324             print "## [%s][%] is new (%s)" % (item, key, value)
     324            print "## [%s][%s] is new (%s)" % (item, key, value)
    325325          elif value < status[item][key]:
    326326            # Better values always welcome
    327327            status[item][key] = value
    328             print "## [%s][%] is better (%s)" % (item, key, value)
     328            print "## [%s][%s] is better (%s)" % (item, key, value)
    329329    except IOError, e:
    330330      print "## ERROR '%s'" % e
Note: See TracChangeset for help on using the changeset viewer.