From f5c37861916edd10ea7581aaf6a4f66826e49b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20S=C3=A1nchez-Gallego?= Date: Sun, 10 Nov 2024 14:14:16 -0800 Subject: [PATCH] Warn about unknown parameters in profiles --- src/lvmcryo/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lvmcryo/config.py b/src/lvmcryo/config.py index 49b3691..e8e80c5 100644 --- a/src/lvmcryo/config.py +++ b/src/lvmcryo/config.py @@ -198,6 +198,9 @@ def before_validator(cls, data: Any) -> Any: profile_data = config.get("profiles", {}).get(profile, {}) param_source = data.get("param_source", {}) for key in profile_data: + if key not in data: + warnings.warn(f"Unknwon parameter in profile: {key}") + continue psource = param_source.get(key, None) if psource != ParameterSource.COMMANDLINE: data[key] = profile_data[key]