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: Icf5e8a4718dd66d070b0ddc5749a8a0d1abb72c2
This commit is contained in:
Luong Anh Tuan 2016-09-26 11:32:51 +07:00
parent 4d2cd8d22c
commit 7888de8647

View File

@ -337,4 +337,4 @@ def main():
parser.parse_args(sys.argv[1:]).action()
if __name__ == "__main__":
main()
sys.exit(main())