bugfix#1 #2

Closed
vonbirne wants to merge 3 commits from vonbirne/kunsis-dotfiles:bugfix#1 into main

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)
@ -33,11 +35,11 @@ try:
now = datetime.now()
trip_info_req = get('https://portal.imice.de/api1/rs/tripInfo/trip')
trip_info_req = get('https://iceportal.de/api1/rs/tripInfo/trip')
trip_info_req.raise_for_status()
trip_info = trip_info_req.json()['trip']
ice_status_req = get('https://portal.imice.de/api1/rs/status')
ice_status_req = get('https://iceportal.de/api1/rs/status')
ice_status_req.raise_for_status()
ice_status = ice_status_req.json()