From b37d18288d40b4ec0b5a8df676456e09ae5f26c1 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Fri, 13 Jan 2017 12:40:20 +0100 Subject: [PATCH] py3: can_read: attributelevelrights is already string Remove decode() as it causes error in py3 because the attribute is already string not bytes https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes --- ipaserver/plugins/ldap2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py index c4b7580d2..71c095d05 100644 --- a/ipaserver/plugins/ldap2.py +++ b/ipaserver/plugins/ldap2.py @@ -310,7 +310,7 @@ class ldap2(CrudBackend, LDAPClient): attrs = self.get_effective_rights(dn, [attr]) if 'attributelevelrights' in attrs: - attr_rights = attrs.get('attributelevelrights')[0].decode('UTF-8') + attr_rights = attrs.get('attributelevelrights')[0] (attr, rights) = attr_rights.split(':') if 'w' in rights: return True