Skip to content

Commit d1ab240

Browse files
mattsahnjonthornton
authored andcommitted
Fix for running in FALSE=False mode
1 parent 68d112a commit d1ab240

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

mtapi/mtapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def __init__(self, key, stations_file, expires_seconds=60, max_trains=10, max_mi
6767
self._MAX_TRAINS = max_trains
6868
self._MAX_MINUTES = max_minutes
6969
self._EXPIRES_SECONDS = expires_seconds
70+
self._THREADED = threaded
7071
self._stations = {}
7172
self._stops_to_stations = {}
7273
self._routes = {}
@@ -212,7 +213,7 @@ def get_by_id(self, ids):
212213
return out
213214

214215
def is_expired(self):
215-
if self.threader and self.threader.restart_if_dead():
216+
if self._THREADED and self.threader and self.threader.restart_if_dead():
216217
return False
217218
elif self._EXPIRES_SECONDS:
218219
age = datetime.datetime.now(TZ) - self._last_update

0 commit comments

Comments
 (0)