bugfix#1 #2
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||||
|
@ -33,11 +35,11 @@ try:
|
||||||
|
|
||||||
now = datetime.now()
|
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_req.raise_for_status()
|
||||||
trip_info = trip_info_req.json()['trip']
|
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_req.raise_for_status()
|
||||||
ice_status = ice_status_req.json()
|
ice_status = ice_status_req.json()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue