Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
Improve Status Message
Browse files Browse the repository at this point in the history
  • Loading branch information
sergirubio committed Feb 20, 2018
1 parent 77a3fab commit 803bdbe
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions panic/ds/PyAlarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,9 @@ def always_executed_hook(self):
if self.get_enabled():
self.set_state(PyTango.DevState.ALARM if actives
else PyTango.DevState.ON)
status = "There are %d active alarms\n" % len(actives)
status = "There are %d/%d active alarms\n" % (
len(actives),len(self.Alarms))

else:
self.set_state(PyTango.DevState.DISABLE)
status = ("Device is DISABLED temporarily (Enabled=%s)\n"
Expand All @@ -1467,8 +1469,11 @@ def always_executed_hook(self):
if self.Uncatched:
status+='\nUncatched exceptions:\n%s'%self.Uncatched

self.eval_status = 'EvalTimes are: \n %s\n'%(self.EvalTimes)
self.set_status(status)
self.eval_status = "Last eval was %s at %s" % (
self.Eval.getter('TAG'),
time2str(self.Eval.getter('now')))
#self.eval_status += 'EvalTimes are: \n %s\n'%(self.EvalTimes)
self.set_status(status+self.eval_status)

except:
self.warning( traceback.format_exc())
Expand Down

0 comments on commit 803bdbe

Please sign in to comment.