mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-20 18:45:32 +01:00
Catch SSL errors which probably relate to self-signed certificates
This commit is contained in:
@@ -75,6 +75,10 @@ def request_response(url, method="get", auto_raise=True,
|
||||
response.raise_for_status()
|
||||
|
||||
return response
|
||||
except requests.exceptions.SSLError:
|
||||
logger.error("Unable to connect to remote host because of a SSL " \
|
||||
"error. It's likely the remote certificate is untrusted by your " \
|
||||
"system. This check can be disabled (advanced users only).")
|
||||
except requests.ConnectionError:
|
||||
logger.error(
|
||||
"Unable to connect to remote host. Check if the remote "
|
||||
|
||||
Reference in New Issue
Block a user