From 61909127cd4a0cb34aaf1bf137498c4d08ea7352 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 5 Aug 2020 19:53:57 -0300 Subject: [PATCH] Fixed initialization of empty sub-options. --- kiplot/optionable.py | 1 + kiplot/out_base.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/kiplot/optionable.py b/kiplot/optionable.py index 9c1d201a..5070b620 100644 --- a/kiplot/optionable.py +++ b/kiplot/optionable.py @@ -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) diff --git a/kiplot/out_base.py b/kiplot/out_base.py index f67aece9..3b33dead 100644 --- a/kiplot/out_base.py +++ b/kiplot/out_base.py @@ -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)