[Buildroot] [PATCH 1/2] utils/getdeveloperlib.py: fix check_output() return value decoding

Peter Korsgaard peter at korsgaard.com
Wed Nov 3 22:10:29 UTC 2021


>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at bootlin.com> writes:

 > On Wed, 03 Nov 2021 22:15:42 +0100
 > Peter Korsgaard <peter at korsgaard.com> wrote:

 >> >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni at bootlin.com> writes:  
 >> 
 >> > In Python 3.x, check_output() returns a "bytes" array, and not a
 >> > string. Its result needs to be decoded to be turned into a
 >> > string. Without this fix, "get-developers -c" bails out with:  
 >> 
 >> > Traceback (most recent call last):
 >> >   File "/home/thomas/projets/buildroot/./utils/get-developers", line 105, in <module>
 >> >     __main__()
 >> >   File "/home/thomas/projets/buildroot/./utils/get-developers", line 53, in __main__
 >> >     files = getdeveloperlib.check_developers(devs)
 >> >   File "/home/thomas/projets/buildroot/utils/getdeveloperlib.py", line 280, in check_developers
 >> >     files = subprocess.check_output(cmd).strip().split("\n")
 >> > TypeError: a bytes-like object is required, not 'str'  
 >> 
 >> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>  
 >> 
 >> Alternatively we could use universal_newlines=True, but Ok - Committed
 >> to 2021.02.x and 2021.08.x, thanks.

 > But was this committed to master already? It seems not. Isn't it
 > dangerous to start committing stuff to stable branches that are not in
 > master? I thought you were only cherry-picking stuff from master.

I am, you applied it to master yesterday?

https://git.buildroot.net/buildroot/commit/?id=53da6a7c05f75af925d235f22db2142b5067806e

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list