mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-04-20 11:29:54 +00:00
scripts/runfvp: Fix KeyError exception when there is no FVP_CONSOLE provided
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> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -55,8 +55,8 @@ def start_fvp(args, config, extra_args):
|
||||
fvp.start(config, extra_args, args.terminals)
|
||||
|
||||
if args.console:
|
||||
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
|
||||
port_stdout, log_stdout = itertools.tee(fvp.stdout, 2)
|
||||
|
||||
Reference in New Issue
Block a user