1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 18:53:21 +01:00

use logging module for error messages during downloads

This commit is contained in:
Mike Fährmann 2018-01-26 18:11:13 +01:00
parent db91cf871c
commit f94e3706a8
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 4 additions and 2 deletions

View File

@ -53,6 +53,7 @@ class DownloaderBase():
def download_impl(self, url, pathfmt):
"""Actual implementaion of the download process"""
adj_ext = None
tries = 0
msg = ""
@ -62,7 +63,7 @@ class DownloaderBase():
while True:
self.reset()
if tries:
self.out.error(pathfmt.path, msg, tries, self.retries)
self.log.error("%s (%d/%d)", msg, tries, self.retries)
if tries >= self.retries:
return False
time.sleep(tries)
@ -80,7 +81,7 @@ class DownloaderBase():
except exception.DownloadComplete:
break
except Exception as exc:
self.out.error(pathfmt.path, exc, 0, 0)
self.log.error(exc)
return False
# check response

View File

@ -20,6 +20,7 @@ SKIP = {
# temporary issues
"chronos",
"coreimg",
"imagebam",
}