]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
replace '_' with '-' in validation error path
authorAleš Mrázek <ales.mrazek@nic.cz>
Tue, 25 Jul 2023 08:20:16 +0000 (10:20 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Thu, 27 Jul 2023 12:39:37 +0000 (12:39 +0000)
This is not the best way to do it, but it is the easiest.

manager/knot_resolver_manager/utils/modeling/exceptions.py

index dafb1ee23ef6e67ec39c1b828c0a108d6b5c7856..34d25b876932066bfacdc00c5b2440f4f921eba7 100644 (file)
@@ -20,7 +20,7 @@ class DataDescriptionError(DataModelingBaseException):
 class DataValidationError(DataModelingBaseException):
     def __init__(self, msg: str, tree_path: str, child_exceptions: "Iterable[DataValidationError]" = tuple()) -> None:
         super().__init__(msg)
-        self._tree_path = tree_path
+        self._tree_path = tree_path.replace("_", "-")
         self._child_exceptions = child_exceptions
 
     def where(self) -> str: