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>
This commit is contained in:
1 parent
0e752aab29
commit
4aec9d2280
1 file changed
+4
-3
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user