Merge pull request #129 from rleh/patch/v6_sch

KiCad 6: Catch environment.vars==None case
This commit is contained in:
Salvador E. Tropea 2022-01-04 16:54:50 -03:00 committed by GitHub
commit 34bea23e06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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))