mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-06 03:39:51 +01:00
Merge remote-tracking branch 'origin/develop' into feature/cleanup
* origin/develop: Log exact write check error to log (debug) Catch SSL errors which probably relate to self-signed certificates
This commit is contained in:
@@ -329,9 +329,10 @@ def doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list,
|
||||
headphones.CONFIG.MOVE_FILES:
|
||||
|
||||
try:
|
||||
with open(downloaded_track, "a+b"):
|
||||
pass
|
||||
except IOError:
|
||||
with open(downloaded_track, "a+b") as fp:
|
||||
fp.seek(0)
|
||||
except IOError as e:
|
||||
logger.debug("Write check exact error: %s", e)
|
||||
logger.error("Track file is not writeable. This is required " \
|
||||
"for some post processing steps: %s. Not continuing.",
|
||||
downloaded_track.decode(headphones.SYS_ENCODING, "replace"))
|
||||
|
||||
@@ -76,6 +76,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