summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2017-02-02 16:51:21 +0100
committerMartin Basti <mbasti@redhat.com>2017-02-08 15:41:39 +0100
commit6bb5af7bea21d44b4e5ee20cfaa2f76b12ea0929 (patch)
treeef0fd2e77db24e2b1261ac8405511c1ee5e1434f /ipaserver/plugins
parentd38540acd614bcaa489023401fc8db7c02cd3892 (diff)
downloadfreeipa-6bb5af7bea21d44b4e5ee20cfaa2f76b12ea0929.tar.gz
freeipa-6bb5af7bea21d44b4e5ee20cfaa2f76b12ea0929.tar.xz
freeipa-6bb5af7bea21d44b4e5ee20cfaa2f76b12ea0929.zip
py3: get_memberofindirect: fix ByteWarnings
DN must be converted to bytes as other variables adn lists contain bytes https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipaserver/plugins')
-rw-r--r--ipaserver/plugins/baseldap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipaserver/plugins/baseldap.py b/ipaserver/plugins/baseldap.py
index 24b6db7c0..79ba7fc4a 100644
--- a/ipaserver/plugins/baseldap.py
+++ b/ipaserver/plugins/baseldap.py
@@ -722,7 +722,7 @@ class LDAPObject(Object):
direct = set()
indirect = set(entry.raw.get('memberof', []))
for group_entry in result:
- dn = str(group_entry.dn)
+ dn = str(group_entry.dn).encode('utf-8')
if dn in indirect:
indirect.remove(dn)
direct.add(dn)