On 07/12/16 15:53, Ard Biesheuvel wrote:
> On 12 July 2016 at 15:50, Ard Biesheuvel <ard.biesheu...@linaro.org> wrote:
>> On 12 July 2016 at 15:48, Laszlo Ersek <ler...@redhat.com> wrote:
> [...]
>>> In commit bd907fb6386560e621112beca7b7d381d0003967, I used the
>>> string.join() method, but I forgot to set the separator to the empty string.
>>>
>>> https://docs.python.org/2/library/string.html#string.join
>>>
>>> The paddings now contain 0x20 as every second byte.
>>>
>>> I'll send a patch soon. Thanks for the report.
>>>
>>
>> Indeed. The following hunk fixes it for me
>>
>> @@ -56,7 +57,7 @@ class Region(RegionClassObject):
>>                  PadByte = pack('B', 0xFF)
>>              else:
>>                  PadByte = pack('B', 0)
>> -            PadData = string.join(PadByte for i in xrange(0, Size))
>> +            PadData = string.join((PadByte for i in xrange(0, Size)), '')
>>              Buffer.write(PadData)
>>
>>      ## AddToBuffer()
> 
> ... or, given that string.join() is listed as deprecated, the following
> 
> @@ -56,7 +57,7 @@ class Region(RegionClassObject):
>                  PadByte = pack('B', 0xFF)
>              else:
>                  PadByte = pack('B', 0)
> -            PadData = string.join(PadByte for i in xrange(0, Size))
> +            PadData = ''.join(PadByte for i in xrange(0, Size))
>              Buffer.write(PadData)
> 
>      ## AddToBuffer()
> 

Thanks; this is the patch I'll send in a minute. Please respond with
your R-b / T-b, and then I'll push it at once, considering it has the
potential to break all platforms. ("Achievement unlocked" for me, I
guess. :/)

Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to