diff options
Diffstat (limited to 'kvmd/yamlconf/__init__.py')
-rw-r--r-- | kvmd/yamlconf/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/yamlconf/__init__.py b/kvmd/yamlconf/__init__.py index 42a69cfa..7cd3808d 100644 --- a/kvmd/yamlconf/__init__.py +++ b/kvmd/yamlconf/__init__.py @@ -143,8 +143,8 @@ class Option: def manual_validated(value: Any, *path: str) -> Generator[None, None, None]: try: yield - except (TypeError, ValueError) as err: - raise ConfigError(f"Invalid value {value!r} for key {'/'.join(path)!r}: {err}") + except (TypeError, ValueError) as ex: + raise ConfigError(f"Invalid value {value!r} for key {'/'.join(path)!r}: {ex}") def make_config(raw: dict[str, Any], scheme: dict[str, Any], _keys: tuple[str, ...]=()) -> Section: @@ -185,8 +185,8 @@ def make_config(raw: dict[str, Any], scheme: dict[str, Any], _keys: tuple[str, . else: try: value = option.type(value) - except (TypeError, ValueError) as err: - raise ConfigError(f"Invalid value {value!r} for key {make_full_name(key)!r}: {err}") + except (TypeError, ValueError) as ex: + raise ConfigError(f"Invalid value {value!r} for key {make_full_name(key)!r}: {ex}") config[key] = value config._set_meta( # pylint: disable=protected-access |