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,6 +4,7 @@ from threading import Thread, Event
|
||||
|
||||
import pytz
|
||||
import requests
|
||||
from requests import ReadTimeout
|
||||
from requests.exceptions import ConnectionError
|
||||
|
||||
from core.constants import HTTP_HEADERS
|
||||
@@ -59,6 +60,8 @@ class HTTPSpotProvider(SpotProvider):
|
||||
|
||||
except ConnectionError:
|
||||
logging.warning(f"Connection error when accessing {self.name} spots API.")
|
||||
except ReadTimeout:
|
||||
logging.warning(f"Read timeout when accessing {self.name} spots API.")
|
||||
except Exception:
|
||||
self.status = "Error"
|
||||
logging.exception("Exception in HTTP JSON Spot Provider (" + self.name + ")")
|
||||
|
||||
Reference in New Issue
Block a user