From b0e615fbedada79b2f9b7dda2e6a623bd7cdc2a0 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Thu, 25 Nov 2021 11:28:58 -0300 Subject: [PATCH] Fixed debug print for levels > 3 - In the expands when the object didn't have a parent --- kibot/optionable.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kibot/optionable.py b/kibot/optionable.py index df8dbfcf..177ba6a9 100644 --- a/kibot/optionable.py +++ b/kibot/optionable.py @@ -212,7 +212,10 @@ class Optionable(object): """ Expands %* values in filenames. Uses data from the PCB. """ if GS.debug_level > 3: - logger.debug('Expanding `{}` in PCB context for {} parent: {}'.format(name, self, self._parent)) + parent = None + if hasattr(self, '_parent'): + parent = self._parent + logger.debug('Expanding `{}` in PCB context for {} parent: {}'.format(name, self, parent)) if GS.board: GS.load_pcb_title_block() # Do the replacements