Fixed debug print for levels > 3

- In the expands when the object didn't have a parent
This commit is contained in:
Salvador E. Tropea 2021-11-25 11:28:58 -03:00
parent ad173a3c07
commit b0e615fbed
1 changed files with 4 additions and 1 deletions

View File

@ -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