1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

Fixed startup exception when unable to connect

This commit is contained in:
A_D 2020-10-23 12:40:21 +02:00 committed by Athanasius
parent 2d127ae3d0
commit 98b27ee046

View File

@ -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}")
return None
except requests.exceptions.BaseHTTPError as e:
logger.warning(f"unable to connect to {target:r}: {e}")
except (requests.exceptions.BaseHTTPError, requests.exceptions.ConnectionError) as e:
logger.warning(f"unable to connect to {target!r}: {e}")
return None
return data