fix the bug with format time for real #1

Open
vonbirne wants to merge 1 commit from bugfix#1 into main
Showing only changes of commit 05636a6568 - Show all commits

View file

@ -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)
@ -67,7 +69,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: