Structure changes to match other projects and minor logging improvements

This commit is contained in:
Ian Renton
2026-07-26 07:47:38 +01:00
parent ecab8d6d16
commit c3bcc1190d
483 changed files with 70 additions and 55 deletions
+3 -1
View File
@@ -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