From 81b864ec192c70aa2cb2894a9286de75fa99b9a9 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 8 Feb 2020 17:20:27 -0800 Subject: [PATCH] main should return args.func(args) value. --- utilities/database_upgrader.py | 2 +- utilities/ytqueue.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utilities/database_upgrader.py b/utilities/database_upgrader.py index 6d052c2..c2a8c81 100644 --- a/utilities/database_upgrader.py +++ b/utilities/database_upgrader.py @@ -113,7 +113,7 @@ def main(argv): parser.set_defaults(func=upgrade_all_argparse) args = parser.parse_args(argv) - args.func(args) + return args.func(args) if __name__ == '__main__': raise SystemExit(main(sys.argv[1:])) diff --git a/utilities/ytqueue.py b/utilities/ytqueue.py index 7ae3e1b..698f034 100644 --- a/utilities/ytqueue.py +++ b/utilities/ytqueue.py @@ -39,7 +39,7 @@ def main(argv): parser.set_defaults(func=ytqueue_argparse) args = parser.parse_args(argv) - args.func(args) + return args.func(args) if __name__ == '__main__': - main(sys.argv[1:]) + raise SystemExit(main(sys.argv[1:]))