aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLu lei <lei.lu@easystack.cn>2016-08-01 13:27:50 +0800
committerLu lei <lei.lu@easystack.cn>2016-08-02 09:32:28 +0800
commit684b483fa814990e879d20de6a3c7046d068998d (patch)
treeef5b1feac928bc2ddbb7dc6578016218157bfbeb
parente5ca547f373bdae7207236190422fd18840dd711 (diff)
downloadkolla-684b483fa814990e879d20de6a3c7046d068998d.tar.gz
kolla-684b483fa814990e879d20de6a3c7046d068998d.zip
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
-rwxr-xr-xkolla/cmd/build.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py
index eafe8ee73..d0d6ab7d9 100755
--- a/kolla/cmd/build.py
+++ b/kolla/cmd/build.py
@@ -33,4 +33,4 @@ def main():
if __name__ == '__main__':
- main()
+ sys.exit(main())