changes for 3.0
[monitor.git] / nodeinfo.py
index 30838f1..5aecea3 100755 (executable)
@@ -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]