NR: Don't die if Eagle's not here

This commit is contained in:
Evelyn 2017-11-03 19:20:12 +00:00
parent 9588b7520a
commit 93862e0347

View file

@ -333,8 +333,8 @@ class Module(object):
datetime.utcnow().time().strftime("%H:%M:%S+0000"))
if eagle_url:
schedule_query = Utils.get_url("%s/schedule/%s/%s" % (eagle_url, service_id, datetime.now().date().isoformat()), json=True, headers={"x-eagle-key": eagle_key})
schedule = schedule_query["current"]
segment = schedule["schedule_segment"]
schedule = schedule_query.get("current")
segment = schedule.get("schedule_segment")
if not query and not schedule:
return event["stdout"].write("No service information is available for this identifier.")