From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv2] support/scripts/boot-qemu-image.py: handle when pexpect.spawn() exit early
Date: Sat, 18 Apr 2020 19:23:34 +0200 [thread overview]
Message-ID: <20200418172334.GS5853@scaer> (raw)
In-Reply-To: <20200418184718.43631b8e@windsurf.home>
On 2020-04-18 18:47 +0200, Thomas Petazzoni spake thusly:
> 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 ?
Besides, it is not None we should test against, but 'None" (the string
'None', not the object None).
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2020-04-18 17:23 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
2020-04-18 17:23 ` Yann E. MORIN [this message]
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=20200418172334.GS5853@scaer \
--to=yann.morin.1998@free.fr \
--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