diff options
author | Martin Basti <mbasti@redhat.com> | 2015-03-23 12:33:30 +0100 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2015-04-14 19:25:47 +0200 |
commit | 4aec9d2280a5ebbf1acae3abee215cd7a28f23c2 (patch) | |
tree | 6d13800d4853ca94d12489b620fdf238c3008225 /ipaserver/install/ldapupdate.py | |
parent | 0e752aab297ad0a2c43d6c8755db175f45de028e (diff) | |
download | freeipa-4aec9d2280a5ebbf1acae3abee215cd7a28f23c2.tar.gz freeipa-4aec9d2280a5ebbf1acae3abee215cd7a28f23c2.tar.xz freeipa-4aec9d2280a5ebbf1acae3abee215cd7a28f23c2.zip |
Server Upgrade: Handle connection better in updates_from_dict
Connection should be closed if update is done
https://fedorahosted.org/freeipa/ticket/4904
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/install/ldapupdate.py')
-rw-r--r-- | ipaserver/install/ldapupdate.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ipaserver/install/ldapupdate.py b/ipaserver/install/ldapupdate.py index 4bb260b33..6d1c589ec 100644 --- a/ipaserver/install/ldapupdate.py +++ b/ipaserver/install/ldapupdate.py @@ -868,10 +868,11 @@ class LDAPUpdate: updates is a dictionary containing the updates """ self.modified = False - if not self.conn: + try: self.create_connection() - - self._run_updates(updates) + self._run_updates(updates) + finally: + self.close_connection() return self.modified |