From 7ba2b209f11ad4d2b543fbb5a8191fc3a792f7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 29 May 2024 02:56:25 +0200 Subject: [PATCH] fix exit status of --clear-cache/--list-modules/--list-extractors All three would always cause gallery-dl to exit with status 1, regardless of error or success. --- gallery_dl/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 8ee8cf5b..bc44b353 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -213,6 +213,7 @@ def main(): if cnt is None: log.error("Database file not available") + return 1 else: log.info( "Deleted %d %s from '%s'", @@ -305,6 +306,7 @@ def main(): input_manager.next() return retval + return 0 except KeyboardInterrupt: raise SystemExit("\nKeyboardInterrupt")