summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):
"""