use logging module for error messages during downloads
This commit is contained in:
@@ -53,6 +53,7 @@ class DownloaderBase():
|
|||||||
|
|
||||||
def download_impl(self, url, pathfmt):
|
def download_impl(self, url, pathfmt):
|
||||||
"""Actual implementaion of the download process"""
|
"""Actual implementaion of the download process"""
|
||||||
|
adj_ext = None
|
||||||
tries = 0
|
tries = 0
|
||||||
msg = ""
|
msg = ""
|
||||||
|
|
||||||
@@ -62,7 +63,7 @@ class DownloaderBase():
|
|||||||
while True:
|
while True:
|
||||||
self.reset()
|
self.reset()
|
||||||
if tries:
|
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:
|
if tries >= self.retries:
|
||||||
return False
|
return False
|
||||||
time.sleep(tries)
|
time.sleep(tries)
|
||||||
@@ -80,7 +81,7 @@ class DownloaderBase():
|
|||||||
except exception.DownloadComplete:
|
except exception.DownloadComplete:
|
||||||
break
|
break
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
self.out.error(pathfmt.path, exc, 0, 0)
|
self.log.error(exc)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# check response
|
# check response
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ SKIP = {
|
|||||||
# temporary issues
|
# temporary issues
|
||||||
"chronos",
|
"chronos",
|
||||||
"coreimg",
|
"coreimg",
|
||||||
|
"imagebam",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user