main should return the args.func(args) value.

This commit is contained in:
voussoir 2020-02-08 17:24:57 -08:00
parent 92f3569971
commit 851ab2d4cc
3 changed files with 5 additions and 5 deletions

View file

@ -63,7 +63,7 @@ def main(argv):
parser.set_defaults(func=run_argparse) parser.set_defaults(func=run_argparse)
args = parser.parse_args(argv) args = parser.parse_args(argv)
args.func(args) return args.func(args)
if __name__ == '__main__': if __name__ == '__main__':
raise SystemExit(main(sys.argv[1:])) raise SystemExit(main(sys.argv[1:]))

View file

@ -47,7 +47,7 @@ def main(argv):
parser.set_defaults(func=erepl_argparse) parser.set_defaults(func=erepl_argparse)
args = parser.parse_args(argv) args = parser.parse_args(argv)
args.func(args) return args.func(args)
if __name__ == '__main__': if __name__ == '__main__':
main(sys.argv[1:]) raise SystemExit(main(sys.argv[1:]))

View file

@ -303,7 +303,7 @@ def main(argv):
parser.set_defaults(func=upgrade_all_argparse) parser.set_defaults(func=upgrade_all_argparse)
args = parser.parse_args(argv) args = parser.parse_args(argv)
args.func(args) return args.func(args)
if __name__ == '__main__': if __name__ == '__main__':
main(sys.argv[1:]) raise SystemExit(main(sys.argv[1:]))