Commit 6ce37239 authored by Florent Guillaume's avatar Florent Guillaume

Move code inside try/except.

parent 506fb82c
......@@ -21,11 +21,11 @@ class SiteErrorLogTests(unittest.TestCase):
def setUp(self):
transaction.begin()
self.app = makerequest(Zope2.app())
if not hasattr(self.app, 'error_log'):
# If ZopeLite was imported, we have no default error_log
from Products.SiteErrorLog.SiteErrorLog import SiteErrorLog
self.app._setObject('error_log', SiteErrorLog())
try:
if not hasattr(self.app, 'error_log'):
# If ZopeLite was imported, we have no default error_log
from Products.SiteErrorLog.SiteErrorLog import SiteErrorLog
self.app._setObject('error_log', SiteErrorLog())
self.app.manage_addDTMLMethod('doc', '')
except:
self.tearDown()
......
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