diff --git a/src/rougail/convert.py b/src/rougail/convert.py index f4dc76a3..207af608 100644 --- a/src/rougail/convert.py +++ b/src/rougail/convert.py @@ -178,7 +178,10 @@ class ParserVariable: "structural_commandline.add_extra_options" ] self.structurals = rougailconfig["step.structural"] - self.user_datas = rougailconfig["step.user_data"] + try: + self.user_datas = rougailconfig["step.user_data"] + except: + self.user_datas = [] try: self.output = rougailconfig["step.output"] except: diff --git a/src/rougail/object_model.py b/src/rougail/object_model.py index a3c7a1f0..7f2c5124 100644 --- a/src/rougail/object_model.py +++ b/src/rougail/object_model.py @@ -452,7 +452,7 @@ class _VariableCalculation(Calculation): ) if variable and not isinstance(variable, objectspace.variable): if isinstance(variable, objectspace.family): - msg = f'the variable "{variable.path}" is in fact a family in attribute "{self.attribute_name}" for "{self.path}"' + msg = f'a variable "{variable.path}" is needs in attribute "{self.attribute_name}" for "{self.path}" but it\'s a family' raise DictConsistencyError(msg, 47, self.xmlfiles) else: msg = f'unknown object "{variable}" in attribute "{self.attribute_name}" for "{self.path}"' diff --git a/src/rougail/path.py b/src/rougail/path.py index b0dbf799..7afc5c43 100644 --- a/src/rougail/path.py +++ b/src/rougail/path.py @@ -74,7 +74,6 @@ class Paths: def get_with_dynamic( self, path: str, - # identifier_path: str, current_path: str, version: str, namespace: str, @@ -145,9 +144,7 @@ class Paths: if "{{ suffix }}" in path: path = path.replace("{{ suffix }}", "{{ identifier }}") elif not path in self._data: - current_path = None - parent_path = None - new_path = current_path + new_path = parent_path = current_path = None identifiers = [] for name in path.split("."): if current_path: