API Replay: use sys.exit only upon error

Otherwise let the program complete normally with status code 0

Change-Id: Ib7b626bec8bbf8ab3e38f54bfefe4d154aa298ee
This commit is contained in:
Salvatore Orlando 2021-06-26 08:28:22 -07:00
parent fe0e3089cb
commit 70d1156b26

View File

@ -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,