Commit 2b03f910 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 37ded9c4
......@@ -393,6 +393,7 @@ class TestOAuth2(ERP5TypeTestCase):
Zope2.app(connection=self.portal._p_jar),
]
published_callable = request.traverse(path)
exc = None
try:
response.setBody(
mapply(
......@@ -403,10 +404,9 @@ class TestOAuth2(ERP5TypeTestCase):
bind=1,
),
)
except Exception as exc:
except Exception as e:
exc = e
raise
else:
exc = None
finally:
setSecurityManager(current_security_manager)
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