NR: bool.get, what
This commit is contained in:
parent
31e53e8bc4
commit
6bdeccac03
1 changed files with 3 additions and 2 deletions
|
@ -333,8 +333,9 @@ class Module(object):
|
||||||
datetime.utcnow().time().strftime("%H:%M:%S+0000"))
|
datetime.utcnow().time().strftime("%H:%M:%S+0000"))
|
||||||
if eagle_url:
|
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_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.get("current")
|
if schedule_query:
|
||||||
segment = schedule.get("schedule_segment")
|
schedule = schedule_query["current"]
|
||||||
|
segment = schedule["schedule_segment"]
|
||||||
if not query and not schedule:
|
if not query and not schedule:
|
||||||
return event["stdout"].write("No service information is available for this identifier.")
|
return event["stdout"].write("No service information is available for this identifier.")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue