Skip to content

Commit

Permalink
Exclude unnecessary parameters in version support exception (puzzle#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonGiovanni83 authored Apr 18, 2024
1 parent 3fcca7e commit 3d24fec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/module_utils/config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ def get(self, setting_name: str) -> Element:
supported_settings: List[str] = []
for cfg_map in self._config_maps.values():
supported_settings.extend(cfg_map.keys())

if "php_requirements" in supported_settings:
supported_settings.remove("php_requirements")
if "configure_functions" in supported_settings:
supported_settings.remove("configure_functions")

raise UnsupportedModuleSettingError(
f"Setting '{setting_name}' is not supported in module '{self._module_name}' "
f"for OPNsense version '{self.opnsense_version}'."
Expand Down

0 comments on commit 3d24fec

Please sign in to comment.