summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-18 12:43:54 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-18 12:43:54 +0100
commit481473734ed1915e787cf8bfccd4a5fc454eabdc (patch)
treef816d571b910a93c09fabb8556764f6ec9a4ddc3 /pykolab
parent64af1446121402cb2eeed871c97c4e39dd3ae3ce (diff)
downloadpykolab-481473734ed1915e787cf8bfccd4a5fc454eabdc.tar.gz
Prevent attempting to modify an entry with an empty modlist (#786)
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 7cdb018..d98dfa9 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -676,7 +676,8 @@ class LDAP(pykolab.base.Base):
modlist.append((ldap.MOD_ADD, attribute, attrs[attribute]))
dn = entry_dn
- self.ldap.modify_s(dn, modlist)
+ if len(modlist) > 0:
+ self.ldap.modify_s(dn, modlist)
def synchronize(self):
"""