From 684b483fa814990e879d20de6a3c7046d068998d Mon Sep 17 00:00:00 2001 From: Lu lei Date: Mon, 1 Aug 2016 13:27:50 +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. TrivialFix. Change-Id: I184289d28b92a7e345907247c045535a0c42c974 --- kolla/cmd/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py index eafe8ee739..d0d6ab7d94 100755 --- a/kolla/cmd/build.py +++ b/kolla/cmd/build.py @@ -33,4 +33,4 @@ def main(): if __name__ == '__main__': - main() + sys.exit(main())