Remove catch + sys.exit idiom
This is bad, python already prints exceptino message and exit with non-zero code when an exception is raised, no need to catch the exception just to print it. In addition, printing an exception does not print stacktrace, so catch + sys.exit provide less information than python's default behavior. Test: th Change-Id: If6cf2e34d4ebc9f7d172063b4396bf4377dad447
This commit is contained in:
@@ -300,8 +300,5 @@ if __name__ == "__main__":
|
||||
try:
|
||||
common.CloseInheritedPipes()
|
||||
main(sys.argv[1:])
|
||||
except common.ExternalError:
|
||||
logger.exception("\n ERROR:\n")
|
||||
sys.exit(1)
|
||||
finally:
|
||||
common.Cleanup()
|
||||
|
Reference in New Issue
Block a user