mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-20 02:25:31 +01:00
Add more logging for issue #2058
This commit is contained in:
@@ -76,10 +76,15 @@ 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.exceptions.SSLError as e:
|
||||
if not kwargs["verify"]:
|
||||
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).")
|
||||
else:
|
||||
logger.error("SSL error raised during connection, even with " \
|
||||
"SSL certificate verification turned off: %s", e)
|
||||
except requests.ConnectionError:
|
||||
logger.error(
|
||||
"Unable to connect to remote host. Check if the remote "
|
||||
|
||||
Reference in New Issue
Block a user