Also catch connection errors (connection resets, etc.)
This commit is contained in:
parent
f05d639fe5
commit
aaaf0e748b
@ -207,7 +207,7 @@ def update(station_id: int):
|
|||||||
lines=lines_filter
|
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))
|
print("Could not get the data: " + str(e))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user