summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-09-24 11:31:43 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-09-24 11:31:43 +0200
commit2784e8fc5c1f95298139f584536053e2065055da (patch)
tree1fdf35b0772d44254883d5fd285f2a8ae86e9b20 /pykolab
parentb526846a778dfda29d16d7fa70648cce2cda341c (diff)
downloadpykolab-2784e8fc5c1f95298139f584536053e2065055da.tar.gz
Correctly count the number of elements expected to be returned from a split(', ') (#4990)
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 9d190ac..7840ea6 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1326,7 +1326,7 @@ class LDAP(pykolab.base.Base):
for acl_entry in entry[folderacl_entry_attribute]:
acl_access = acl_entry.split()[-1]
- if len(acl_entry.split(', ')) > 0:
+ if len(acl_entry.split(', ')) > 1:
aci_subject = ', '.join(acl_entry.split(', ')[:-1])
else:
aci_subject = acl_entry.split()[0]
@@ -1723,7 +1723,7 @@ class LDAP(pykolab.base.Base):
for acl_entry in entry[folderacl_entry_attribute]:
acl_access = acl_entry.split()[-1]
- if len(acl_entry.split(', ')) > 0:
+ if len(acl_entry.split(', ')) > 1:
aci_subject = ', '.join(acl_entry.split(', ')[:-1])
else:
aci_subject = acl_entry.split()[0]