--- a/ui.py Sat Jan 20 21:27:05 2018 +0000 +++ b/ui.py Sat Jan 20 21:52:16 2018 +0000 @@ -10,13 +10,13 @@ INACTIVE=0 ACTIVE=1 -ERROR=2 +ERRORS=2 -traynames={INACTIVE: 'B.', ACTIVE: 'B!', ERROR: 'B?'} +traynames={INACTIVE: 'B.', ACTIVE: 'B!', ERRORS: 'B?'} def combine_state(state1, state2): - if state1==ERROR or state2==ERROR: - return ERROR + if state1==ERRORS or state2==ERRORS: + return ERRORS elif state1==ACTIVE or state2==ACTIVE: return ACTIVE else: @@ -24,6 +24,7 @@ def make_title(status): state=INACTIVE + if status['type']=='scheduled': # Operation scheduled when=status['when'] @@ -44,7 +45,7 @@ detail='' if 'detail' in status and status['detail']: if status['detail']=='retry': - state=ERROR + state=ERRORS detail=status['detail']+' ' title="%s (%s%s %s)" % (status['name'], detail, status['operation'], whenstr) elif status['type']=='current': @@ -58,6 +59,9 @@ # Should be unscheduled, nothing running title=status['name'] + if status['errors']: + state=ERRORS + return title, state