Commit 2e336f3b authored by Aurel's avatar Aurel

wip : test not patching WSGIPublisher as it is a backport from Zope4

parent 1da6c053
......@@ -15,7 +15,7 @@ import ZConfig
import Zope2
from Zope2.Startup.run import make_wsgi_app
from Products.ERP5Type.patches.WSGIPublisher import publish_module
from ZPublisher.WSGIPublisher import publish_module
# this class licensed under the MIT license (stolen from pyramid_translogger)
......
......@@ -21,7 +21,7 @@
##############################################################################
# Load all monkey patches
from Products.ERP5Type.patches import WSGIPublisher
#from Products.ERP5Type.patches import WSGIPublisher
from Products.ERP5Type.patches import HTTPRequest
from Products.ERP5Type.patches import AccessControl_patch
from Products.ERP5Type.patches import Restricted
......
......@@ -388,7 +388,7 @@ def load_app(module_info):
try:
yield (app, realm, debug_mode, validated_hook)
finally:
if transaction.manager._txn is not None:
if getattr(transaction.manager, '_txn', None) is not None:
# Only abort a transaction, if one exists. Otherwise the
# abort creates a new transaction just to abort it.
transaction.abort()
......@@ -470,4 +470,4 @@ def publish_module(environ, start_response,
return result
sys.modules['ZPublisher.WSGIPublisher'] = sys.modules[__name__]
#sys.modules['ZPublisher.WSGIPublisher'] = sys.modules[__name__]
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