Browse Source

Fixd an issue with get_name_from_direction

atexit
Raphael Roberts 6 years ago
parent
commit
1068e6fe6e
  1. 2
      .gitignore
  2. 3
      ctabus/fetch.py

2
.gitignore

@ -11,3 +11,5 @@ stderr.log
sensitive.py
*.egg-info
/ctabus_venv/*
.venv
*.json

3
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"],

Loading…
Cancel
Save