Don't stringify variables that aren't suitable.

Related to #38 though potentially not fixed.
This commit is contained in:
Olivier 'reivilibre' 2021-09-18 07:18:23 +01:00
parent 00784ffa56
commit 3c62b93401

View File

@ -215,7 +215,9 @@ class DependencyVarProxy:
self._tracker.register_variable(self._current_path_prefix, raw_value)
return str(raw_value)
else:
return repr(self)
raise ValueError(
f"Trying to stringify a variable proxy which contains {repr(self)}"
)
def raw_(self) -> Union[Dict[str, Any], List[Any], int, str, bool]:
if not self._current_path_prefix: