bugfix#1 #2

Closed
vonbirne wants to merge 3 commits from vonbirne/kunsis-dotfiles: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 # bundlewrap.utils.text.format_duration, but trimmed down
def format_time(seconds): def format_time(seconds):
if seconds is None:
return "?"
components = [] components = []
if seconds >= 3600: if seconds >= 3600:
hours = int(seconds / 3600) hours = int(seconds / 3600)
@ -67,7 +69,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: