Fix access to exception using Python 3 scoping rules (#62268)

This commit is contained in:
Christian Clauss 2019-09-17 19:28:37 +02:00 committed by Sam Doran
parent edf15b346f
commit 23c7bf6481

View file

@ -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):