From d597dab65c75931a7c7e807c3290ba43683f6edd Mon Sep 17 00:00:00 2001 From: gecong1973 Date: Wed, 4 Jan 2017 09:18:24 +0800 Subject: [PATCH] Using sys.exit(main()) instead of main() As we known, Exceptions are raised by the sys.exit() function. When they are not handled, no stack traceback is printed in the Python interpreter. In this patch we have known main() got return values(eg:0, 1), but it can't specifies exit status when terminate the main thread by unusing sys.exit(). So when using sys.exit(main()) instead of main() may be more readable and reasonable. Change-Id: Ie69b3a22dd1ddcd5586fc72f452cd162787f2f6f --- tools/install_venv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install_venv.py b/tools/install_venv.py index f47477669..544abc6bb 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -70,4 +70,4 @@ def main(argv): print_help(venv, root) if __name__ == '__main__': - main(sys.argv) + sys.exit(main(sys.argv))