Fix accessing wrappers in Jinja templates via attributes

This commit is contained in:
jeanluc 2024-05-30 21:43:16 +02:00 committed by Daniel Wozniak
parent 47e4c80a74
commit 0c8cb6890e
2 changed files with 2 additions and 1 deletions

1
changelog/66600.fixed.md Normal file
View file

@ -0,0 +1 @@
Fixed accessing wrapper modules in Salt-SSH Jinja templates via attribute syntax

View file

@ -139,7 +139,7 @@ class FunctionWrapper:
):
super().__init__()
self.cmd_prefix = cmd_prefix
self.wfuncs = wfuncs if isinstance(wfuncs, dict) else {}
self.wfuncs = wfuncs if wfuncs is not None else {}
self.opts = opts
self.mods = mods if isinstance(mods, dict) else {}
self.kwargs = {"id_": id_, "host": host}