Server Upgrade: raise RuntimeError instead exit()

Ldapupdater should not call sys.exit() in the middle of execution and
should fail gracefully

https://fedorahosted.org/freeipa/ticket/4904

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Martin Basti 2015-05-12 13:00:10 +02:00 committed by Jan Cholasta
parent 7660f40e2b
commit 6c438fff33

View File

@ -894,7 +894,7 @@ class LDAPUpdate:
data = self.read_file(f)
except Exception, e:
self.error("error reading update file '%s'", f)
sys.exit(e)
raise RuntimeError(e)
self.parse_update_file(f, data, all_updates)
self._run_updates(all_updates)