Using sys.exit(main()) instead of main()

TrivialFix: Similar [1] in Kolla project
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.
Therefore, when using sys.exit(main()) instead of main()
may be more readable and reasonable.

[1] https://review.openstack.org/#/c/349353/

Change-Id: Ie4654b75892de025be73a17a76cdeac1f357ebbd
This commit is contained in:
Luong Anh Tuan 2016-09-26 11:23:42 +07:00
parent f44eae1735
commit fd6c52d5ef
1 changed files with 1 additions and 1 deletions

View File

@ -182,4 +182,4 @@ def main():
if __name__ == '__main__':
main()
sys.exit(main())