From: Peter Hoyes <Peter.Hoyes@arm.com>
To: peron.clem@gmail.com, meta-arm@lists.yoctoproject.org
Subject: Re: [meta-arm] [PATCH 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
Date: Wed, 29 Mar 2023 16:42:19 +0100 [thread overview]
Message-ID: <b350a9cd-8fc5-f4ee-e3e2-d6d95ccdaed2@arm.com> (raw)
In-Reply-To: <20230329120057.58949-2-peron.clem@gmail.com>
On 29/03/2023 13:00, Clément Péron via lists.yoctoproject.org wrote:
> We access the dictionnary element that doesn't exist.
>
> Use the get() method instead that will default the element to None if it
> doesn't exist.
>
> Signed-off-by: Clément Péron <peron.clem@gmail.com>
Reviewed-by: Peter Hoyes <peter.hoyes@arm.com>
> ---
> scripts/runfvp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/runfvp b/scripts/runfvp
> index c5a74b2f..ee60486c 100755
> --- a/scripts/runfvp
> +++ b/scripts/runfvp
> @@ -55,8 +55,8 @@ async def start_fvp(args, config, extra_args):
>
> if args.console:
> fvp.add_line_callback(lambda line: logger.debug(f"FVP output: {line}"))
> - expected_terminal = config["consoles"]["default"]
> - if not expected_terminal:
> + expected_terminal = config["consoles"].get("default")
> + if expected_terminal is None:
> logger.error("--console used but FVP_CONSOLE not set in machine configuration")
> return 1
> telnet = await fvp.create_telnet(expected_terminal)
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#4496): https://lists.yoctoproject.org/g/meta-arm/message/4496
> Mute This Topic: https://lists.yoctoproject.org/mt/97926510/5715260
> Group Owner: meta-arm+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [peter.hoyes@arm.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
next prev parent reply other threads:[~2023-03-29 15:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 12:00 [PATCH 1/2] arm/lib: pass the PATH to fvp runner Clément Péron
2023-03-29 12:00 ` [PATCH 2/2] scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided Clément Péron
2023-03-29 15:42 ` Peter Hoyes [this message]
2023-03-31 3:01 ` [PATCH 1/2] arm/lib: pass the PATH to fvp runner Jon Mason
2023-03-31 20:11 ` Jon Mason
2023-05-25 0:51 ` Jon Mason
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=b350a9cd-8fc5-f4ee-e3e2-d6d95ccdaed2@arm.com \
--to=peter.hoyes@arm.com \
--cc=meta-arm@lists.yoctoproject.org \
--cc=peron.clem@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.