From 2784e8fc5c1f95298139f584536053e2065055da Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" Date: Thu, 24 Sep 2015 11:31:43 +0200 Subject: Correctly count the number of elements expected to be returned from a split(', ') (#4990) --- pykolab/auth/ldap/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pykolab/auth/ldap') 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] -- cgit v1.1