move sys.exit out of try finally block in set_config.py file
when code exit by using sys.exit in try..catch block, it will skip catch and run the code in finally. Because SystemExit does not inherit from Exception. This patch moves sys.exit out of finally block. Then it won't execute when script exits by sys.exit Change-Id: I6457b1b861d2f9fdadce788ac6b719f46c7f2af3 Partial-Bug: #1631503
This commit is contained in:
parent
4bda9aa844
commit
d1676d38e4
@ -305,5 +305,4 @@ if __name__ == "__main__":
|
||||
except Exception:
|
||||
exit_code = 1
|
||||
LOG.exception('Unexpected error:')
|
||||
finally:
|
||||
sys.exit(exit_code)
|
||||
|
Loading…
Reference in New Issue
Block a user