Commit c2c5607a authored by Jérome Perrin's avatar Jérome Perrin

use a finally bloc to restore normal log handling on failure


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25772 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4656f0de
...@@ -549,10 +549,12 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): ...@@ -549,10 +549,12 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
from Products.ERP5Type.Base import _aq_reset from Products.ERP5Type.Base import _aq_reset
_aq_reset() _aq_reset()
self._catch_log_errors(ignored_level=INFO) self._catch_log_errors(ignored_level=INFO)
try:
folder = self.getOrganisationModule() folder = self.getOrganisationModule()
orga = folder.newContent(portal_type='Organisation',) orga = folder.newContent(portal_type='Organisation',)
# call an accessor, _aq_dynamic will generate accessors # call an accessor, _aq_dynamic will generate accessors
orga.getId() orga.getId()
finally:
self._ignore_log_errors() self._ignore_log_errors()
def test_09_RenameObjects(self, quiet=quiet, run=run_all_test): def test_09_RenameObjects(self, quiet=quiet, run=run_all_test):
......
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