[Tests][Fixed] Missing fix in optionable

This commit is contained in:
Salvador E. Tropea 2023-01-10 15:11:05 -03:00
parent db6fa6767a
commit 7fc02734b8
1 changed files with 2 additions and 0 deletions

View File

@ -130,6 +130,8 @@ class Optionable(object):
def _perform_config_mapping(self): def _perform_config_mapping(self):
""" Map the options to class attributes """ """ Map the options to class attributes """
attrs = self.get_attrs_for() attrs = self.get_attrs_for()
if not isinstance(self._tree, dict):
raise KiPlotConfigurationError('Found {} instead of dict'.format(type(self._tree)))
for k, v in self._tree.items(): for k, v in self._tree.items():
# Map known attributes and avoid mapping private ones # Map known attributes and avoid mapping private ones
if (k[0] == '_') or (k not in attrs): if (k[0] == '_') or (k not in attrs):