[modules/error] Minor refactoring

This commit is contained in:
tobi-wan-kenobi 2020-04-11 13:21:41 +02:00
parent 1a5a324498
commit 2837a78502

View file

@ -22,9 +22,9 @@ class Module(core.module.Module):
def __set_error(self, error='n/a', state='critical'): def __set_error(self, error='n/a', state='critical'):
self.__error = error self.__error = error
self.__state = state self.__state = state
self.update()
def state(self, widget): def state(self, widget):
if self.__error: return [self.__state] if self.__error: return [self.__state]
return []
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4