[modules/error] Minor refactoring
This commit is contained in:
parent
1a5a324498
commit
2837a78502
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue