If the YAML lists no features, the lookup for qemu_bin is prematurely aborted, even for QEMU environment configs.
Split up the try/except clauses to fix this. Signed-off-by: Ahmad Fatoum <[email protected]> Link: https://lore.barebox.org/[email protected] Signed-off-by: Sascha Hauer <[email protected]> (cherry picked from commit 0f474e5b689fc22990abe83984aeef12349ddaef) Signed-off-by: Ahmad Fatoum <[email protected]> --- conftest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index 06321c938dba..2f72d3fe5322 100644 --- a/conftest.py +++ b/conftest.py @@ -128,9 +128,13 @@ def strategy(request, target, pytestconfig): try: main = target.env.config.data["targets"]["main"] features = main["features"] - qemu_bin = main["drivers"]["QEMUDriver"]["qemu_bin"] except KeyError: features = [] + + try: + main = target.env.config.data["targets"]["main"] + qemu_bin = main["drivers"]["QEMUDriver"]["qemu_bin"] + except KeyError: qemu_bin = None virtio = None -- 2.47.3
