build: Simplify get_compiler()

Update #3818.
This commit is contained in:
Sebastian Huber
2020-09-27 09:34:27 +02:00
parent 73926320d7
commit 9a27c9cfd8

View File

@@ -1340,8 +1340,8 @@ def check_compiler(ctx, compiler):
def get_compiler(conf, cp, variant):
try:
value = cp.get(conf.variant, "COMPILER")
cp.remove_option(conf.variant, "COMPILER")
value = cp.get(variant, "COMPILER")
cp.remove_option(variant, "COMPILER")
value = no_unicode(value)
check_compiler(conf, value)
except configparser.NoOptionError: