Also catch connection errors (connection resets, etc.)

This commit is contained in:
Christopher Teutsch 2019-05-17 11:53:25 +02:00
parent f05d639fe5
commit aaaf0e748b
Signed by: iwonder
GPG Key ID: 0EE33D788D50130D

View File

@ -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