From 7a53f1445619fc471c2823e7081de8b6039b938e Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Wed, 18 Sep 2024 04:37:43 +0300 Subject: refactoring --- kvmd/yamlconf/loader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kvmd/yamlconf/loader.py') diff --git a/kvmd/yamlconf/loader.py b/kvmd/yamlconf/loader.py index 215cb526..5f879354 100644 --- a/kvmd/yamlconf/loader.py +++ b/kvmd/yamlconf/loader.py @@ -40,9 +40,9 @@ def load_yaml_file(path: str) -> Any: with open(path) as file: try: return yaml.load(file, _YamlLoader) - except Exception as err: + except Exception as ex: # Reraise internal exception as standard ValueError and show the incorrect file - raise ValueError(f"Invalid YAML in the file {path!r}:\n{tools.efmt(err)}") from None + raise ValueError(f"Invalid YAML in the file {path!r}:\n{tools.efmt(ex)}") from None # ===== -- cgit v1.2.3