From 70d1156b26b5d85e3e2e955147ece34ab405d518 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Sat, 26 Jun 2021 08:28:22 -0700 Subject: [PATCH] API Replay: use sys.exit only upon error Otherwise let the program complete normally with status code 0 Change-Id: Ib7b626bec8bbf8ab3e38f54bfefe4d154aa298ee --- vmware_nsx/api_replay/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmware_nsx/api_replay/client.py b/vmware_nsx/api_replay/client.py index c6467847a4..0dc5f5d74c 100644 --- a/vmware_nsx/api_replay/client.py +++ b/vmware_nsx/api_replay/client.py @@ -180,9 +180,9 @@ class ApiReplayClient(utils.PrepareObjectForMigration): LOG.error("NSX migration is Done with %s errors:", self.n_errors) for err in self.errors: LOG.error(err) + sys.exit(self.n_errors) else: LOG.info("NSX migration is Done with no errors") - sys.exit(self.n_errors) def _get_session(self, username, user_domain_id, tenant_name, tenant_domain_id,