[Freeipa-devel] [PATCHES] More Python 3 porting

Petr Viktorin pviktori at redhat.com
Tue Oct 6 10:05:46 UTC 2015


Please ignore that mail, I sent an unfinished draft by mistake.

On 10/06/2015 12:02 PM, Petr Viktorin wrote:
[...]
> 
> OK, changed.
> 
> 
>>>> Patch 724:
>>>>
>>>> The SSHPublicKey class was written with the assumption that "str" means
>>>> binary data, so unless I'm missing something, you only need to replace
>>>> "str" with "bytes".
>>>
>>> It specifically did take non-binary data as str:
>>>
>>> -        if isinstance(key, str) and key[:3] != '\0\0\0':
>>> -            key = key.decode(encoding)
>>
>> I don't follow, this is quite obviously binary data. It reads: "If key
>> is binary and does not start with 3 null bytes, decode it to text using
>> the specified encoding."
> 
> Sorry, I meant binary data.
> 




-- 
Petr Viktorin




More information about the Freeipa-devel mailing list