From 61ff61cdf6a6cfb749d550a8ea781856dfda73a4 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Thu, 13 Jun 2019 21:36:53 +0200 Subject: [PATCH] Tests as filters were deprecated, remove unused param (#57796) --- lib/ansible/playbook/conditional.py | 2 +- lib/ansible/template/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/playbook/conditional.py b/lib/ansible/playbook/conditional.py index 296c213d6d5..6c827e9d67a 100644 --- a/lib/ansible/playbook/conditional.py +++ b/lib/ansible/playbook/conditional.py @@ -172,7 +172,7 @@ class Conditional: ) try: e = templar.environment.overlay() - e.filters.update(templar._get_filters(e.filters)) + e.filters.update(templar._get_filters()) e.tests.update(templar._get_tests()) res = e._parse(conditional, None, None) diff --git a/lib/ansible/template/__init__.py b/lib/ansible/template/__init__.py index e942ce5da66..857d950f28c 100644 --- a/lib/ansible/template/__init__.py +++ b/lib/ansible/template/__init__.py @@ -442,7 +442,7 @@ class Templar: self._no_type_regex = re.compile(r'.*?\|\s*(?:%s)(?:\([^\|]*\))?\s*\)?\s*(?:%s)' % ('|'.join(C.STRING_TYPE_FILTERS), self.environment.variable_end_string)) - def _get_filters(self, builtin_filters): + def _get_filters(self): ''' Returns filter plugins, after loading and caching them if need be ''' @@ -775,7 +775,7 @@ class Templar: setattr(myenv, key, ast.literal_eval(val.strip())) # Adds Ansible custom filters and tests - myenv.filters.update(self._get_filters(myenv.filters)) + myenv.filters.update(self._get_filters()) myenv.tests.update(self._get_tests()) if escape_backslashes: