ice-status: fix int conversion
This commit is contained in:
parent
88ed4d22f0
commit
defa59dfe2
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ from sys import exit
|
||||||
def format_time(seconds):
|
def format_time(seconds):
|
||||||
if seconds is None:
|
if seconds is None:
|
||||||
return "?"
|
return "?"
|
||||||
|
seconds = int(seconds)
|
||||||
components = []
|
components = []
|
||||||
if seconds >= 3600:
|
if seconds >= 3600:
|
||||||
hours = int(seconds / 3600)
|
hours = int(seconds / 3600)
|
||||||
|
@ -69,7 +70,7 @@ try:
|
||||||
ice_status['speed'],
|
ice_status['speed'],
|
||||||
next_stop,
|
next_stop,
|
||||||
ice_status['connectivity']['currentState'],
|
ice_status['connectivity']['currentState'],
|
||||||
format_time(int(ice_status['connectivity']['remainingTimeSeconds'])),
|
format_time(ice_status['connectivity']['remainingTimeSeconds']),
|
||||||
ice_status['connectivity']['nextState'],
|
ice_status['connectivity']['nextState'],
|
||||||
))
|
))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in a new issue