From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv2] support/scripts/boot-qemu-image.py: handle when pexpect.spawn() exit early
Date: Sat, 18 Apr 2020 18:47:18 +0200 [thread overview]
Message-ID: <20200418184718.43631b8e@windsurf.home> (raw)
In-Reply-To: <20200418161023.1221799-1-romain.naour@gmail.com>
On Sat, 18 Apr 2020 18:10:23 +0200
Romain Naour <romain.naour@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
next prev parent reply other threads:[~2020-04-18 16:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-18 16:10 [Buildroot] [PATCHv2] support/scripts/boot-qemu-image.py: handle when pexpect.spawn() exit early Romain Naour
2020-04-18 16:47 ` Thomas Petazzoni [this message]
2020-04-18 17:23 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200418184718.43631b8e@windsurf.home \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox