Commit d6c47282 authored by Aurel's avatar Aurel Committed by Arnaud Fontaine

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

parent dffb5d64
......@@ -20,7 +20,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)
......
......@@ -24,7 +24,7 @@ import six
from Products.ERP5Type import WITH_LEGACY_WORKFLOW
# 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
......
......@@ -411,7 +411,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()
......@@ -496,4 +496,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