diff options
author | Christian Clauss <cclauss@me.com> | 2019-09-17 19:28:37 +0200 |
---|---|---|
committer | Sam Doran <sdoran@redhat.com> | 2019-09-17 13:28:37 -0400 |
commit | 23c7bf648160184b6f520274c063f7730aa26c8d (patch) | |
tree | c8304762be5fc1197b11facc73d77c2ce2cb9893 /test/units | |
parent | edf15b346f4929ce0474e44cdeaa9fed9b375458 (diff) | |
download | ansible-23c7bf648160184b6f520274c063f7730aa26c8d.tar.gz |
Fix access to exception using Python 3 scoping rules (#62268)
Diffstat (limited to 'test/units')
-rw-r--r-- | test/units/template/test_templar.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/units/template/test_templar.py b/test/units/template/test_templar.py index d96e43b7c1..6ba90e2927 100644 --- a/test/units/template/test_templar.py +++ b/test/units/template/test_templar.py @@ -286,9 +286,9 @@ class TestTemplarMisc(BaseTemplar, unittest.TestCase): # FIXME Use assertRaises() as a context manager (added in 2.7) once we do not run tests on Python 2.6 anymore. try: templar.available_variables = "foo=bam" - except AssertionError as e: + except AssertionError: pass - except Exception: + except Exception as e: self.fail(e) def test_templar_escape_backslashes(self): |