From 4d6b47edd037d053dad4a1d1314427905ac909a6 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Sun, 16 Jan 2022 15:19:04 -0300 Subject: [PATCH] Fixed missing check for kicad_pcb/setup/stackup iterator --- kibot/globals.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kibot/globals.py b/kibot/globals.py index 70905853..d718c797 100644 --- a/kibot/globals.py +++ b/kibot/globals.py @@ -81,7 +81,10 @@ class Globals(FiltersOptions): logger.debug("- Failed to load the PCB "+str(e)) if pcb is None: return - sp = next(sexp_iter(pcb, 'kicad_pcb/setup/stackup'), None) + iter = sexp_iter(pcb, 'kicad_pcb/setup/stackup') + if iter is None: + return + sp = next(iter, None) if sp is None: return logger.debug("- Found stack-up information")