[Buildroot] [PATCHv2] support/scripts/boot-qemu-image.py: handle when pexpect.spawn() exit early
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Sat Apr 18 16:47:18 UTC 2020
On Sat, 18 Apr 2020 18:10:23 +0200
Romain Naour <romain.naour at gmail.com> wrote:
> diff --git a/support/scripts/boot-qemu-image.py b/support/scripts/boot-qemu-image.py
> index 2c1afba398..f2abaf83ed 100755
> --- a/support/scripts/boot-qemu-image.py
> +++ b/support/scripts/boot-qemu-image.py
> @@ -34,7 +34,7 @@ def main():
> # In this case, spawn above will succeed at starting the wrapper
> # start-qemu.sh, but that one will fail (exit with 127) in such
> # a situation.
> - exit = [int(l.split(' ')[1])
> + exit = [int(l.split(' ')[1] if l is None else int(127))
I know I'm not very good with Python, but if I read this correctly you
are doing l.split() if l is None here, so you're trying to do a
l.split() precisely when is None... Are you sure this is working ?
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the buildroot
mailing list