aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/__init__.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-11-10 22:14:10 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-11-10 22:14:10 -0500
commit0c73e982fa596da07f23b377621ab894a9e64884 (patch)
tree96f6a40a5656c15a2ec7217a8a1efcff5827bcbb /gallery_dl/__init__.py
parent40f5fe6edef268632d3bc484e85e5b37bad67bff (diff)
New upstream version 1.11.1upstream/1.11.1
Diffstat (limited to 'gallery_dl/__init__.py')
-rw-r--r--gallery_dl/__init__.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py
index 94a445a..9665823 100644
--- a/gallery_dl/__init__.py
+++ b/gallery_dl/__init__.py
@@ -234,6 +234,7 @@ def main():
if pformat and len(urls) > 1 and args.loglevel < logging.ERROR:
urls = progress(urls, pformat)
+ retval = 0
for url in urls:
try:
log.debug("Starting %s for '%s'", jobtype.__name__, url)
@@ -241,17 +242,20 @@ def main():
for key, value in url.gconfig:
config.set(key, value)
with config.apply(url.lconfig):
- jobtype(url.value).run()
+ retval |= jobtype(url.value).run()
else:
- jobtype(url).run()
+ retval |= jobtype(url).run()
except exception.NoExtractorError:
log.error("No suitable extractor found for '%s'", url)
+ retval |= 64
+ return retval
except KeyboardInterrupt:
sys.exit("\nKeyboardInterrupt")
except BrokenPipeError:
pass
- except IOError as exc:
+ except OSError as exc:
import errno
if exc.errno != errno.EPIPE:
raise
+ return 1