From 51812b7e93c5ee0b4a97e29fed51d5fc56481aed Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 4 Jan 2019 19:37:56 +0100 Subject: [PATCH] Don't crash if can_also_build does not contain hostarch --- osc/commandline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index 6cd4e27d..ee4bbfe5 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -6011,7 +6011,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. if (arg == osc.build.hostarch or arg in all_archs) and arg_arch is None: # it seems to be an architecture in general arg_arch = arg - if not (arg in osc.build.can_also_build.get(osc.build.hostarch) or arg == osc.build.hostarch): + if not (arg == osc.build.hostarch or arg in osc.build.can_also_build.get(osc.build.hostarch, [])): print("WARNING: native compile is not possible, an emulator must be configured!") elif not arg_repository: arg_repository = arg