From 1068e6fe6ee13b549089297f84b75124e70a53bb Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Mon, 16 Sep 2019 11:57:01 -0500 Subject: [PATCH] Fixd an issue with get_name_from_direction --- .gitignore | 2 ++ ctabus/fetch.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index dd2695a..b1d30d9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ stderr.log sensitive.py *.egg-info /ctabus_venv/* +.venv +*.json diff --git a/ctabus/fetch.py b/ctabus/fetch.py index c8eb7de..0b3798b 100644 --- a/ctabus/fetch.py +++ b/ctabus/fetch.py @@ -59,9 +59,10 @@ def get_name_from_direction(route, direction, api_key=api, timeout=None): @disk_cache_with_setup def get_data_from_stop_id(stop_id, __setup__=None): if __setup__ is None: - info = get_times(stop_id)["prd"][0] + info = get_times(stop_id) else: info = __setup__ + info = info["prd"][0] ret = { "route_direction": info["rtdir"], "route_name": info["des"],