Skip to content

Commit 438c926

Browse files
committed
qtvcp -notify: silence annoying error message
In qtdragon/hd the statusbar was switched to a textline and so a harmless error message was shown in the terminal. this fixes that and restores the message getting to the textline. ultimately we should use a send a hal_glib message rather then call the widget directly
1 parent c8c92c0 commit 438c926

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/python/qtvcp/lib/notify.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,11 @@ def show_status(self, message, timeout=4):
269269
if self.statusbar is not None:
270270
try:
271271
messageid = self.statusbar.showMessage(message, timeout * 1000)
272-
except Exception as e:
273-
log.warning('Error adding msg to statusbar:', exc_info=e)
272+
except:
273+
try:
274+
messageid = self.statusbar.setText(message)
275+
except Exception as e:
276+
log.verbose('Error adding msg to statusbar: {}'.format(e))
274277

275278
# show the previous critical messages that popped up
276279
# Currently alarm page doesn't keep track of what

0 commit comments

Comments
 (0)