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:
parent
e5ca547f37
commit
684b483fa8
@ -33,4 +33,4 @@ def main():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
sys.exit(main())
|
||||||
|
Loading…
Reference in New Issue
Block a user