1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-28 10:46:15 +01:00

Don't crash if can_also_build does not contain hostarch

This commit is contained in:
Andreas Schwab 2019-01-04 19:37:56 +01:00
parent b4b1ec7b64
commit 51812b7e93

View File

@ -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