[OE-core] [PATCH] oepydevshell-internal.py: decode only when readdata is valid
Changqing Li
changqing.li at windriver.com
Wed Nov 14 09:44:43 UTC 2018
On 11/13/18 7:10 PM, Burton, Ross wrote:
> On Tue, 13 Nov 2018 at 10:03, Richard Purdie
> <richard.purdie at linuxfoundation.org> wrote:
>
>> Usually you'd write this as:
>>
>> if readdata:
>> i = i + readdata.decode('utf-8')
>>
>> Is there a reason not to do that here?
> Whilst this code is being changed, is there a chance of getting a
> partial read that has half of a utf-8 byte sequence?
>
> Ross
Seems "continue" will delay the deal of "i" to next loop, but will
not lost data.
but I still change to let it continue to deal with "i" , in case there
is still "i" not
outputed in last loop. it should be better.
changqing
--
BRs
Sandy(Li Changqing)
More information about the Openembedded-core
mailing list