diff options
Diffstat (limited to 'ipapython')
| -rw-r--r-- | ipapython/dnsutil.py | 2 | ||||
| -rw-r--r-- | ipapython/ipaldap.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ipapython/dnsutil.py b/ipapython/dnsutil.py index 7844d7bec..a11d744d7 100644 --- a/ipapython/dnsutil.py +++ b/ipapython/dnsutil.py @@ -39,7 +39,7 @@ class DNSName(dns.name.Name): try: if isinstance(labels, six.string_types): #pylint: disable=E1101 - labels = dns.name.from_unicode(unicode(labels), origin).labels + labels = dns.name.from_text(unicode(labels), origin).labels elif isinstance(labels, dns.name.Name): labels = labels.labels diff --git a/ipapython/ipaldap.py b/ipapython/ipaldap.py index 38c6aad04..7e5bc04fe 100644 --- a/ipapython/ipaldap.py +++ b/ipapython/ipaldap.py @@ -1314,8 +1314,9 @@ class LDAPClient(object): # pass arguments to python-ldap with self.error_handler(): - filter = self.encode(filter) - attrs_list = self.encode(attrs_list) + if six.PY2: + filter = self.encode(filter) + attrs_list = self.encode(attrs_list) while True: if paged_search: |
