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

more BBB for wsgipublisher when it is zope2

parent b23e1b22
......@@ -20,8 +20,12 @@ import ZConfig
import Zope2
from Zope2.Startup.run import make_wsgi_app
from ZPublisher.WSGIPublisher import publish_module
try:
from ZPublisher.WSGIPublisher import _MODULES
from ZPublisher.WSGIPublisher import publish_module
except ImportError:
# BBB Zope2
from Products.ERP5Type.patches.WSGIPublisher import publish_module
# this class licensed under the MIT license (stolen from pyramid_translogger)
class TransLogger(object):
......
......@@ -495,5 +495,8 @@ def publish_module(environ, start_response,
# Return the result body iterable.
return result
#sys.modules['ZPublisher.WSGIPublisher'] = sys.modules[__name__]
try:
from ZPublisher.WSGIPublisher import _MODULES
except ImportError:
# BBB Zope2
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