Get original entry state from LDAP in LDAPUpdate.

This commit is contained in:
Jan Cholasta 2014-01-22 12:50:19 +01:00 committed by Petr Viktorin
parent e218f282a0
commit a5f322cb7b

View File

@ -1332,7 +1332,12 @@ class LDAPUpdate(LDAPQuery, crud.Update):
# mean an error occurred, just that there were no other updates to # mean an error occurred, just that there were no other updates to
# perform. # perform.
assert isinstance(dn, DN) assert isinstance(dn, DN)
self._exc_wrapper(keys, options, ldap.update_entry)(dn, entry_attrs)
update = self._exc_wrapper(keys, options, ldap.get_entry)(
dn, entry_attrs.keys())
update.update(entry_attrs)
self._exc_wrapper(keys, options, ldap.update_entry)(update)
except errors.EmptyModlist, e: except errors.EmptyModlist, e:
if not rdnupdate: if not rdnupdate:
raise e raise e