Skip to content

Commit

Permalink
handle errors when opening download archive file (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Sep 10, 2019
1 parent 6e12907 commit 9178b54
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gallery_dl/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,14 @@ def initialize(self, keywords=None):
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:
Expand Down

0 comments on commit 9178b54

Please sign in to comment.