[modules/redshift] Try to improve transition removal
For some reason, the transition state info sticks around even at night
This commit is contained in:
parent
771eaf331e
commit
3bb7cf51ec
1 changed files with 2 additions and 2 deletions
|
@ -46,7 +46,7 @@ def get_redshift_value(module):
|
||||||
except Exception:
|
except Exception:
|
||||||
res = ''
|
res = ''
|
||||||
widget.set('temp', 'n/a')
|
widget.set('temp', 'n/a')
|
||||||
widget.set('transition', None)
|
widget.set('transition', '')
|
||||||
widget.set('state', 'day')
|
widget.set('state', 'day')
|
||||||
for line in res.split('\n'):
|
for line in res.split('\n'):
|
||||||
line = line.lower()
|
line = line.lower()
|
||||||
|
@ -87,7 +87,7 @@ class Module(core.module.Module):
|
||||||
|
|
||||||
def text(self, widget):
|
def text(self, widget):
|
||||||
val = widget.get('temp', 'n/a')
|
val = widget.get('temp', 'n/a')
|
||||||
transition = widget.get('transition', None)
|
transition = widget.get('transition', '')
|
||||||
if transition:
|
if transition:
|
||||||
val = '{} {}'.format(val, transition)
|
val = '{} {}'.format(val, transition)
|
||||||
return val
|
return val
|
||||||
|
|
Loading…
Reference in a new issue