summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipaserver/install/ldapupdate.py7
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