Hello everyone. I send patch for review.
Regards,
From 7aaf440617963facf7bd156f1e7295562391a3f2 Mon Sep 17 00:00:00 2001 From: "Ariel O. Barria" <[email protected]> Date: Thu, 21 Jul 2016 17:06:05 -0500 Subject: [PATCH] freeipa arielb 0001 six.u function instead of the decode function to avoid DNSName.ToASCII broken with python3 In versions 3.3 onwards is not necessary to use the function six.u based on the following link: https://pythonhosted.org/six/#six.u https://fedorahosted.org/freeipa/ticket/5935 --- ipapython/dnsutil.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipapython/dnsutil.py b/ipapython/dnsutil.py index 16549c8f6a4a0782191526856e918d7ac6b94dcc..d9c4a88f19a35048e24dc1c95dfaff0cae697ceb 100644 --- a/ipapython/dnsutil.py +++ b/ipapython/dnsutil.py @@ -71,7 +71,10 @@ class DNSName(dns.name.Name): def ToASCII(self): #method named by RFC 3490 and python standard library - return self.to_text().decode('ascii') # must be unicode string + if six.PY2: + return self.to_text().decode('ascii') # must be unicode string + else: + return six.u(self.to_text()) # must be unicode string def canonicalize(self): return DNSName(super(DNSName, self).canonicalize()) -- 2.7.4
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
