From 6f90d62be3f9d35dd0517f9ce3232c30866cc80c Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 6 Dec 2018 00:13:26 -0600 Subject: fix py3 scope for unique filter errors, enable filters integration tests on rhel8 beta (#48961) * fix py3 scope for unique filter errors, enable filters integration tests on rhel8 beta Signed-off-by: Adam Miller * add changelog Signed-off-by: Adam Miller --- lib/ansible/plugins/filter/mathstuff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ansible/plugins/filter/mathstuff.py b/lib/ansible/plugins/filter/mathstuff.py index 71cd85ad9c..a0298a6494 100644 --- a/lib/ansible/plugins/filter/mathstuff.py +++ b/lib/ansible/plugins/filter/mathstuff.py @@ -62,12 +62,12 @@ def unique(environment, a, case_sensitive=False, attribute=None): else: c = list(c) except TypeError as e: + error = e _do_fail(e) except Exception as e: + error = e _do_fail(e) display.warning('Falling back to Ansible unique filter as Jinja2 one failed: %s' % to_text(e)) - finally: - error = e if not HAS_UNIQUE or error: -- cgit v1.2.3