Re: [PATCH v1] tools: use integer division in convert-legacy-stream

2021-06-18 Thread Olaf Hering
Am Fri, 18 Jun 2021 10:42:58 +0100 schrieb Andrew Cooper : > This is a Py2 vs Py3 difference. This script is not ready for python 3. At a first glance it is the usual type confusion. It seems the type 'bytearray' exists in both variants. Perhaps stream_read() should return such an object, instea

Re: [PATCH v1] tools: use integer division in convert-legacy-stream

2021-06-18 Thread Olaf Hering
Am Fri, 18 Jun 2021 10:42:58 +0100 schrieb Andrew Cooper : > This is a Py2 vs Py3 difference. Indeed, my build wrapper changes every 'env python' to 'python3.4' in 4.14+ builds. That explains why it happens to work with my 4.13 builds, which changes every 'env python' to 'python2.7'. Olaf pg

Re: [PATCH v1] tools: use integer division in convert-legacy-stream

2021-06-18 Thread Andrew Cooper
On 18/06/2021 10:31, Olaf Hering wrote: > A single slash gives a float, a double slash gives an int. > > bitmap = unpack_exact("Q" * ((max_id/64) + 1)) > TypeError: can't multiply sequence by non-int of type 'float' > > This is broken for unknown reasons since 4.14. :( This is a Py2 vs Py3 di

[PATCH v1] tools: use integer division in convert-legacy-stream

2021-06-18 Thread Olaf Hering
A single slash gives a float, a double slash gives an int. bitmap = unpack_exact("Q" * ((max_id/64) + 1)) TypeError: can't multiply sequence by non-int of type 'float' This is broken for unknown reasons since 4.14. Signed-off-by: Olaf Hering --- tools/python/scripts/convert-legacy-stream |