From c987cfc27370de18565c7d21ca74d505fbb900df Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Wed, 3 Apr 2019 13:13:23 -0500 Subject: [PATCH 1/2] wrong method name --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index c9fe45f..c18f440 100755 --- a/main.py +++ b/main.py @@ -212,7 +212,7 @@ if __name__ == '__main__': sys.stderr = open(osp.join(osp.dirname(__file__), 'stderr.log'), 'w') if args.kill_cache: for cache_obj in disk_cache.caches: - cache_obj.kill_cache() + cache_obj.delete_cache() main(args) for cache_obj in disk_cache.caches: if cache_obj.fresh: From d24c0fba613219e0c2efae5dcc91ccbdab5089df Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Wed, 24 Apr 2019 14:09:47 -0500 Subject: [PATCH 2/2] fixed spam when network connection is dropped --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index c18f440..61ae28d 100755 --- a/main.py +++ b/main.py @@ -188,12 +188,13 @@ def main(args): timeout = args.periodic data = ctabus.get_times(stop_id, timeout=timeout) e = time.perf_counter() - s - if e < args.periodic: - time.sleep(args.periodic-e) except KeyboardInterrupt: _done = True except (urllib.error.URLError, socket.timeout): + e = time.perf_counter() - s print("Error fetching times") + if e < args.periodic: + time.sleep(args.periodic-e) else: show(data, args.route)