Fixed initialization of empty sub-options.

This commit is contained in:
Salvador E. Tropea 2020-08-05 19:53:57 -03:00
parent 547c3a22bb
commit 61909127cd
2 changed files with 3 additions and 0 deletions

View File

@ -21,6 +21,7 @@ class Optionable(object):
def __init__(self):
self._unkown_is_error = False
self._tree = {}
super().__init__()
if GS.global_output is not None and getattr(self, 'output', None):
setattr(self, 'output', GS.global_output)

View File

@ -42,6 +42,8 @@ class BaseOutput(RegOutput):
if getattr(self, 'options', None) and isinstance(self.options, type):
# No options, get the defaults
self.options = self.options()
# Configure them using an empty tree
self.options.config()
def run(self, output_dir, board):
self.options.run(output_dir, board)