Skip to content

Commit

Permalink
Warn about unknown parameters in profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Nov 10, 2024
1 parent 024c2bf commit f5c3786
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lvmcryo/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit f5c3786

Please sign in to comment.