[Checkins] SVN: ZPublisherEventsBackport/trunk/src/ZPublisherEventsBackport/__init__.py make sure the `ZPublisher.Publish.get_module_info` monkey from `plone.app.linkintegrity` gets applied first, so that our monkey will use the right exception hook, which in turn keeps plone's linkintegrity feature working...

Andreas Zeidler az at zitc.de
Tue Jan 12 11:27:39 EST 2010


Log message for revision 108071:
  make sure the `ZPublisher.Publish.get_module_info` monkey from `plone.app.linkintegrity` gets applied first, so that our monkey will use the right exception hook, which in turn keeps plone's linkintegrity feature working...
  

Changed:
  U   ZPublisherEventsBackport/trunk/src/ZPublisherEventsBackport/__init__.py

-=-
Modified: ZPublisherEventsBackport/trunk/src/ZPublisherEventsBackport/__init__.py
===================================================================
--- ZPublisherEventsBackport/trunk/src/ZPublisherEventsBackport/__init__.py	2010-01-12 16:14:13 UTC (rev 108070)
+++ ZPublisherEventsBackport/trunk/src/ZPublisherEventsBackport/__init__.py	2010-01-12 16:27:39 UTC (rev 108071)
@@ -13,7 +13,17 @@
             iface.__module__ = 'ZPublisher.interfaces'
             iface.__identifier__ = "%s.%s" % (iface.__module__, iface.__name__)
             iface.changed(None)
-    
+
+    # the monkey patch for `ZPublisher.Publish.get_module_info` from
+    # `plone.app.linkintegrity` needs to be applied first in order for
+    # our patch to find the right exception hook, which in turn keeps
+    # plone's linkintegrity feature working...
+    try:
+        from plone.app.linkintegrity import monkey
+        monkey.installExceptionHook()
+    except ImportError:
+        pass
+
     from ZPublisherEventsBackport import patch
     ZPublisher.Publish.publish=patch.publish
     logging.info("Monkeypatch ZPublisher publish with publication events")



More information about the checkins mailing list