bugfix: Avoid KeyError
in compilers.yaml version check
This commit is contained in:
parent
84140c6cd3
commit
83323f4e71
@ -27,8 +27,8 @@ def check_compiler_yaml_version():
|
|||||||
data = syaml.load(f)
|
data = syaml.load(f)
|
||||||
|
|
||||||
if data:
|
if data:
|
||||||
compilers = data['compilers']
|
compilers = data.get('compilers')
|
||||||
if len(compilers) > 0:
|
if compilers and len(compilers) > 0:
|
||||||
if (not isinstance(compilers, list) or
|
if (not isinstance(compilers, list) or
|
||||||
'operating_system' not in compilers[0]['compiler']):
|
'operating_system' not in compilers[0]['compiler']):
|
||||||
new_file = os.path.join(scope.path, '_old_compilers.yaml')
|
new_file = os.path.join(scope.path, '_old_compilers.yaml')
|
||||||
|
Loading…
Reference in New Issue
Block a user