Skip to content
Snippets Groups Projects
  • Lu lei's avatar
    684b483f
    Using sys.exit(main()) instead of main() · 684b483f
    Lu lei authored
    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
    684b483f
    History
    Using sys.exit(main()) instead of main()
    Lu lei authored
    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