Commit ae6f5d18 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

py2/py3: exception variable's scope is limited in Python 3.

parent 5b36fcd8
...@@ -393,6 +393,7 @@ class TestOAuth2(ERP5TypeTestCase): ...@@ -393,6 +393,7 @@ class TestOAuth2(ERP5TypeTestCase):
Zope2.app(connection=self.portal._p_jar), Zope2.app(connection=self.portal._p_jar),
] ]
published_callable = request.traverse(path) published_callable = request.traverse(path)
exc = None
try: try:
response.setBody( response.setBody(
mapply( mapply(
...@@ -403,10 +404,9 @@ class TestOAuth2(ERP5TypeTestCase): ...@@ -403,10 +404,9 @@ class TestOAuth2(ERP5TypeTestCase):
bind=1, bind=1,
), ),
) )
except Exception as exc: except Exception as e:
exc = e
raise raise
else:
exc = None
finally: finally:
setSecurityManager(current_security_manager) setSecurityManager(current_security_manager)
cookie_dict = {} cookie_dict = {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment