mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
Fixed startup exception when unable to connect
This commit is contained in:
parent
2d127ae3d0
commit
98b27ee046
@ -78,8 +78,8 @@ def fetch_kill_switches(target=DEFAULT_KILLSWITCH_URL) -> Optional[KILL_SWITCH_J
|
|||||||
logger.warning(f"Failed to get kill switches, data was invalid: {e}")
|
logger.warning(f"Failed to get kill switches, data was invalid: {e}")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
except requests.exceptions.BaseHTTPError as e:
|
except (requests.exceptions.BaseHTTPError, requests.exceptions.ConnectionError) as e:
|
||||||
logger.warning(f"unable to connect to {target:r}: {e}")
|
logger.warning(f"unable to connect to {target!r}: {e}")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user