From 746d4ffc583a847834a592150644fa4270486c89 Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Jan 24 2017 12:25:47 +0000 Subject: py3: make_filter_from_attr: use string instead of bytes Method escape_filter_chars() requires string as parameter instead of bytes. 'value_to_utf8' returns bytes thus this code has to be removed. https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Christian Heimes Reviewed-By: Jan Cholasta --- diff --git a/ipapython/ipaldap.py b/ipapython/ipaldap.py index 57f7dc1..81d8c8d 100644 --- a/ipapython/ipaldap.py +++ b/ipapython/ipaldap.py @@ -1252,8 +1252,9 @@ class LDAPClient(object): value = u'\\'.join( value[i:i+2] for i in six.moves.range(-2, len(value), 2)) else: - value = value_to_utf8(value) + value = six.text_type(value) value = ldap.filter.escape_filter_chars(value) + if not exact: template = '%s' if leading_wildcard: