v6 config: Catch environment.vars==None case

This commit is contained in:
Raphael Lehmann 2022-01-04 03:04:26 +01:00
parent d0801d1e5d
commit 7bdc1f511e
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ class KiConf(object):
""" Environment vars from KiCad 6 configuration """
with open(cfg, 'rt') as f:
data = json.load(f)
if "environment" in data and 'vars' in data['environment']:
if "environment" in data and 'vars' in data['environment'] and (data['environment']['vars'] != None):
for k, v in data['environment']['vars'].items():
if GS.debug_level > 1:
logger.debug('- KiCad var: {}="{}"'.format(k, v))