summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-08 15:06:38 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-08 15:06:38 +0100
commitb1fd2589c6a80cd834d5e5d8b5512021a83cc615 (patch)
treea4ea593c06d230cb8e4d2d02693ba6ff32ba8f0c
parentb43779a966d238a3ebf657aa0a9f36d7ee4a339f (diff)
downloadpykolab-b1fd2589c6a80cd834d5e5d8b5512021a83cc615.tar.gz
Only make integers become a string on modify
-rw-r--r--pykolab/auth/ldap/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 2213f39..da16560 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -884,7 +884,10 @@ class LDAP(object):
mode = ldap.MOD_ADD
try:
- self.ldap.modify(user['dn'], [(mode, attribute, '%s' % (value))])
+ if isinstance(value, int):
+ value = (str)(value)
+
+ self.ldap.modify(user['dn'], [(mode, attribute, value)])
except ldap.LDAPError, e:
log.warning(
_("LDAP modification of attribute %s for %s to value " + \