i3pystatus/ice-status.py: fix error when seconds is None
As recommended by vonbirne in #2
This commit is contained in:
parent
239d003192
commit
88ed4d22f0
1 changed files with 2 additions and 0 deletions
|
@ -8,6 +8,8 @@ from sys import exit
|
|||
|
||||
# bundlewrap.utils.text.format_duration, but trimmed down
|
||||
def format_time(seconds):
|
||||
if seconds is None:
|
||||
return "?"
|
||||
components = []
|
||||
if seconds >= 3600:
|
||||
hours = int(seconds / 3600)
|
||||
|
|
Loading…
Reference in a new issue