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

handle errors when opening download archive file (#417)

This commit is contained in:
Mike Fährmann 2019-09-10 16:44:47 +02:00
parent 6e12907de6
commit 9178b54eae
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -332,7 +332,14 @@ class DownloadJob(Job):
archive = self.extractor.config("archive")
if archive:
path = util.expand_path(archive)
self.archive = util.DownloadArchive(path, self.extractor)
try:
self.archive = util.DownloadArchive(path, self.extractor)
except Exception as exc:
self.extractor.log.warning(
"Failed to open download archive at '%s' ('%s: %s')",
path, exc.__class__.__name__, exc)
else:
self.extractor.log.debug("Using download archive '%s'", path)
postprocessors = self.extractor.config("postprocessors")
if postprocessors: