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:
@@ -4,7 +4,7 @@ from datetime import datetime
|
||||
|
||||
import pytz
|
||||
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
|
||||
@@ -68,6 +68,8 @@ class HEMA(HTTPSpotProvider):
|
||||
# Add to our list. Don't worry about de-duping, removing old spots etc. at this point; other
|
||||
# code will do that for us.
|
||||
new_spots.append(spot)
|
||||
except ReadTimeout:
|
||||
logging.warning(f"Read timeout when accessing HEMA spots API.")
|
||||
except ConnectionError:
|
||||
logging.warning("Connection error when accessing HEMA spots API.")
|
||||
return new_spots
|
||||
|
||||
Reference in New Issue
Block a user