aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/job.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-10-01 19:12:47 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-10-01 19:12:47 -0400
commit639d9ea4a667733aadc3ff83a1df2cc9f0add3a9 (patch)
tree5761b58d6fc3e8bbb99b39b8e4417673bccb0b86 /gallery_dl/job.py
parentc09a9f00dd83017d486cd77650347bc2a397ad55 (diff)
New upstream version 1.10.5upstream/1.10.5
Diffstat (limited to 'gallery_dl/job.py')
-rw-r--r--gallery_dl/job.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/gallery_dl/job.py b/gallery_dl/job.py
index b6b5a6f..d529705 100644
--- a/gallery_dl/job.py
+++ b/gallery_dl/job.py
@@ -266,6 +266,8 @@ class DownloadJob(Job):
if self.postprocessors:
for pp in self.postprocessors:
pp.finalize()
+ if self.archive:
+ self.archive.close()
def handle_skip(self):
self.out.skip(self.pathfmt.path)
@@ -332,7 +334,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: