aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorJeffrey Zhang <zhang.lei.fly@gmail.com>2016-10-14 16:44:54 +0800
committerJeffrey Zhang <zhang.lei.fly@gmail.com>2016-10-14 16:44:54 +0800
commitd1676d38e41bd1ec4f6468d47fdd7d1f076b6f43 (patch)
tree15ee0950588ff0e4ccaba3e9df359e01dc87706f /docker
parent4bda9aa844bf7a45c3baf5bf42eebc16591592e5 (diff)
downloadkolla-d1676d38e41bd1ec4f6468d47fdd7d1f076b6f43.tar.gz
kolla-d1676d38e41bd1ec4f6468d47fdd7d1f076b6f43.zip
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
Diffstat (limited to 'docker')
-rw-r--r--docker/base/set_configs.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py
index cd89992e0..01ae8bc1a 100644
--- a/docker/base/set_configs.py
+++ b/docker/base/set_configs.py
@@ -305,5 +305,4 @@ if __name__ == "__main__":
except Exception:
exit_code = 1
LOG.exception('Unexpected error:')
- finally:
- sys.exit(exit_code)
+ sys.exit(exit_code)