diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2015-09-24 11:31:43 +0200 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2015-09-24 11:31:43 +0200 |
commit | 2784e8fc5c1f95298139f584536053e2065055da (patch) | |
tree | 1fdf35b0772d44254883d5fd285f2a8ae86e9b20 | |
parent | b526846a778dfda29d16d7fa70648cce2cda341c (diff) | |
download | pykolab-2784e8fc5c1f95298139f584536053e2065055da.tar.gz |
Correctly count the number of elements expected to be returned from a split(', ') (#4990)
-rw-r--r-- | pykolab/auth/ldap/__init__.py | 4 |
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] |