From ef67dece522335fd26fcdddc822beb4bcc8e6b17 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Sat, 18 May 2019 11:25:03 +0300 Subject: [PATCH] ldap2.can_read: fix py3 compatibility As with commit b37d18288d, can_read() method does not need to decode a string in Python 3. can_read() wasn't used anywhere in the code, apparently. Related: https://pagure.io/freeipa/issue/7953 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 5d39cdf62..db3eff1ba 100644 --- a/ipaserver/plugins/ldap2.py +++ b/ipaserver/plugins/ldap2.py @@ -301,7 +301,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 'r' in rights: return True