X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nodeinfo.py;h=5aecea391bec4e19df55590f8f5c1fb69179c3ad;hb=refs%2Fheads%2F1.0;hp=30838f1a494eef81643da8fcaae307ad49fdcc2f;hpb=944d143a6528c4157b71f51ed480aec806cbaa06;p=monitor.git diff --git a/nodeinfo.py b/nodeinfo.py index 30838f1..5aecea3 100755 --- a/nodeinfo.py +++ b/nodeinfo.py @@ -46,7 +46,10 @@ def plc_print_nodeinfo(plcnode): def fb_print_nodeinfo(fbnode): pf = PersistFlags(fbnode['hostname'], 1, db='node_persistflags') - fbnode['last_change'] = diff_time(pf.last_changed) + try: + fbnode['last_change'] = diff_time(pf.last_changed) + except: + fbnode['last_change'] = diff_time(time.time()) print " Checked: ", if 'checked' in fbnode: print "%11.11s " % diff_time(fbnode['checked']) @@ -76,8 +79,7 @@ def act_print_nodeinfo(actnode, header): if 'rt' in actnode and 'Status' in actnode['rt']: print "\t %5.5s %5.5s | %8.8s | %15.15s | %s" % \ (actnode['rt']['Status'], actnode['rt']['id'][7:], - actnode['category'], actnode['action'][0], - actnode['msg_format'][:-1]) + actnode['category'], actnode['action'][0], actnode['info'][1:]) else: if type(actnode['action']) == type([]): action = actnode['action'][0]