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. Change-Id: I2fbc21b65d62e7d444bd1acf2858114ef7a5995f
This commit is contained in:
parent
12c70b72d0
commit
23e810e57f
@ -76,4 +76,4 @@ def main(argv):
|
||||
print_help(project, venv, root)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv)
|
||||
sys.exit(main(sys.argv))
|
||||
|
Loading…
Reference in New Issue
Block a user