From 7bdc1f511e9f8763071e829d2d061e254c560e84 Mon Sep 17 00:00:00 2001 From: Raphael Lehmann Date: Tue, 4 Jan 2022 03:04:26 +0100 Subject: [PATCH] v6 config: Catch environment.vars==None case --- kibot/kicad/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kibot/kicad/config.py b/kibot/kicad/config.py index 895cf0d3..70f1c791 100644 --- a/kibot/kicad/config.py +++ b/kibot/kicad/config.py @@ -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))