From aaaf0e748b43724cb63544499f1598c1b4300fc5 Mon Sep 17 00:00:00 2001 From: Christopher Teutsch Date: Fri, 17 May 2019 11:53:25 +0200 Subject: [PATCH] Also catch connection errors (connection resets, etc.) --- monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.py b/monitor.py index 1875aea..e1c3595 100755 --- a/monitor.py +++ b/monitor.py @@ -207,7 +207,7 @@ def update(station_id: int): lines=lines_filter ) ) - except requests.exceptions.HTTPError as e: + except (requests.exceptions.HTTPError, requests.exceptions.ConnectionError) as e: print("Could not get the data: " + str(e)) return None