Re-raise exceptions instead of sys.exit

If we call sys.exit(), code in finally block won't be executed.
Test: th

Change-Id: I1f743c9385218742def3b925427942cb1d5bd031
This commit is contained in:
Kelvin Zhang 2021-04-07 14:56:09 -04:00
parent 55e6511331
commit 66ed06fb29

View file

@ -1383,6 +1383,6 @@ if __name__ == '__main__':
main(sys.argv[1:])
except common.ExternalError as e:
print("\n ERROR: %s\n" % (e,))
sys.exit(1)
raise
finally:
common.Cleanup()