mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-06 02:21:42 +00:00
Structure changes to match other projects and minor logging improvements
This commit is contained in:
@@ -2,7 +2,7 @@ import logging
|
||||
from datetime import datetime
|
||||
|
||||
import requests
|
||||
from requests.exceptions import ConnectionError
|
||||
from requests.exceptions import ConnectionError, ReadTimeout
|
||||
|
||||
from core.constants import HTTP_HEADERS
|
||||
from data.sig_ref import SIGRef
|
||||
@@ -60,4 +60,6 @@ class SOTA(HTTPSpotProvider):
|
||||
new_spots.append(spot)
|
||||
except ConnectionError:
|
||||
logging.warning("Connection error when accessing SOTA spots API")
|
||||
except ReadTimeout:
|
||||
logging.warning(f"Read timeout when accessing SOTA spots API.")
|
||||
return new_spots
|
||||
|
||||
Reference in New Issue
Block a user