summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2022-01-20 14:06:17 -0600
committerGitHub <noreply@github.com>2022-01-20 14:06:17 -0600
commit3ded47c3d3e967ec994b49698ce9f755279ed48f (patch)
treebd62250a95df31030c02e0214bc5f0f2b8c88750 /lib
parentdd2e695c93e06451cfed46f6eb30eb2d8231d29b (diff)
downloadansible-3ded47c3d3e967ec994b49698ce9f755279ed48f.tar.gz
[stable-2.12] Attempt 2: Catch errors getting filters and tests (#76806). (#76809)
(cherry picked from commit 9f46f6eb30e7fa2b88f0038c8f7e37c0db6ba6c5) Co-authored-by: Matt Martz <matt@sivel.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/template/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py
index 3c9c476885..3c27587cb8 100644
--- a/lib/ansible/template/__init__.py
+++ b/lib/ansible/template/__init__.py
@@ -573,9 +573,8 @@ class JinjaPluginIntercept(MutableMapping):
except Exception as e:
raise TemplateSyntaxError(to_native(e), 0)
- method_map = getattr(plugin_impl, self._method_map_name)
-
try:
+ method_map = getattr(plugin_impl, self._method_map_name)
func_items = iteritems(method_map())
except Exception as e:
display.warning(