Better error for unknown global variant.

This commit is contained in:
Salvador E. Tropea 2021-12-01 15:13:12 -03:00
parent a503c5fdc6
commit 31d0c7d87c
1 changed files with 4 additions and 1 deletions

View File

@ -360,7 +360,10 @@ class CfgYamlReader(object):
config_error("YAML config needs `kibot.version`.")
# Solve the global variant
if GS.global_variant:
GS.solved_global_variant = RegOutput.check_variant(GS.global_variant)
try:
GS.solved_global_variant = RegOutput.check_variant(GS.global_variant)
except KiPlotConfigurationError as e:
config_error("In global section: "+str(e))
return outputs