@@ -55,8 +55,9 @@ 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:
+ fvp.add_line_callback(lambda line: logger.debug(f"FVP output: {line}"))
+ 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)
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> --- scripts/runfvp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)