ice-status: fix int conversion

This commit is contained in:
Franzi 2021-12-10 15:53:20 +01:00
parent 88ed4d22f0
commit defa59dfe2
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -10,6 +10,7 @@ from sys import exit
def format_time(seconds):
if seconds is None:
return "?"
seconds = int(seconds)
components = []
if seconds >= 3600:
hours = int(seconds / 3600)
@ -69,7 +70,7 @@ try:
ice_status['speed'],
next_stop,
ice_status['connectivity']['currentState'],
format_time(int(ice_status['connectivity']['remainingTimeSeconds'])),
format_time(ice_status['connectivity']['remainingTimeSeconds']),
ice_status['connectivity']['nextState'],
))
except Exception as e: