Skip to content

Commit

Permalink
Tollerate missing rail data.
Browse files Browse the repository at this point in the history
  • Loading branch information
mossblaser committed Oct 18, 2018
1 parent cca2592 commit 63ffbbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qth_national_rail/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def update_trains():
client.set_property(qth_path, [
"{} ({})".format(service["std"],
service["etd"])
for service in trains["trainServices"]["service"]
for service in trains.get("trainServices", {}).get("service", [])
]),
client.set_property(qth_path + "/detailed", trains),
], loop=loop)
Expand Down

0 comments on commit 63ffbbd

Please sign in to comment.