Browse Source

Merge branch 'master' into notification

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

2
.gitignore

@ -11,3 +11,5 @@ stderr.log
sensitive.py sensitive.py
*.egg-info *.egg-info
/ctabus_venv/* /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 @disk_cache_with_setup
def get_data_from_stop_id(stop_id, __setup__=None): def get_data_from_stop_id(stop_id, __setup__=None):
if __setup__ is None: if __setup__ is None:
info = get_times(stop_id)["prd"][0]
info = get_times(stop_id)
else: else:
info = __setup__ info = __setup__
info = info["prd"][0]
ret = { ret = {
"route_direction": info["rtdir"], "route_direction": info["rtdir"],
"route_name": info["des"], "route_name": info["des"],

Loading…
Cancel
Save