From 851ab2d4cc168de16ba4003ae5e427484580164d Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 8 Feb 2020 17:24:57 -0800 Subject: [PATCH] main should return the args.func(args) value. --- frontends/etiquette_flask/etiquette_flask_launch.py | 2 +- frontends/etiquette_repl/etiquette_repl_launch.py | 4 ++-- utilities/database_upgrader/database_upgrader.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontends/etiquette_flask/etiquette_flask_launch.py b/frontends/etiquette_flask/etiquette_flask_launch.py index 42c7286..fd139f3 100644 --- a/frontends/etiquette_flask/etiquette_flask_launch.py +++ b/frontends/etiquette_flask/etiquette_flask_launch.py @@ -63,7 +63,7 @@ def main(argv): parser.set_defaults(func=run_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/frontends/etiquette_repl/etiquette_repl_launch.py b/frontends/etiquette_repl/etiquette_repl_launch.py index 4335f71..64bad34 100644 --- a/frontends/etiquette_repl/etiquette_repl_launch.py +++ b/frontends/etiquette_repl/etiquette_repl_launch.py @@ -47,7 +47,7 @@ def main(argv): parser.set_defaults(func=erepl_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:])) diff --git a/utilities/database_upgrader/database_upgrader.py b/utilities/database_upgrader/database_upgrader.py index c8d3331..ff335ab 100644 --- a/utilities/database_upgrader/database_upgrader.py +++ b/utilities/database_upgrader/database_upgrader.py @@ -303,7 +303,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__': - main(sys.argv[1:]) + raise SystemExit(main(sys.argv[1:]))