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
This commit is contained in:
Lu lei 2016-08-01 13:27:50 +08:00
parent e5ca547f37
commit 684b483fa8

View File

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