[Freeipa-devel] [PATCH] 0001 six.u function instead of the decode

Petr Spacek pspacek at redhat.com
Tue Jul 26 14:39:21 UTC 2016


On 26.7.2016 16:28, Jan Cholasta wrote:
> Hi,
> 
> On 26.7.2016 16:09, Martin Basti wrote:
>>
>>
>> On 22.07.2016 00:14, Ariel Barria wrote:
>>> Hello everyone.
>>>
>>> I send patch for review.
> 
> NACK, six.u() is supposed to be used on string literals *only* [1].
> 
> A proper fix would be something like:
> 
>     value = self.to_text()
>     if not isinstance(value, unicode):
>         value = value.decode('ascii')
>     return value

Most importantly, we should fix/provide this method in python-dns and inherit
this method from there.

Petr^2 Spacek

> 
>>>
>>> Regards,
>>>
>>>
>>
>> Thank you,
>>
>> I will look on this, for some reason we received your e-mail just today
>> (2016-07-26)
> 
> Honza
> 
> [1] <https://pythonhosted.org/six/#six.u>




More information about the Freeipa-devel mailing list