Commits

Jean-François Roche committed 82abe71

Also compatible with Zope 2.10/2.11

Comments (0)

Files changed (3)

 0.5 (unreleased)
 ----------------
 
-- Nothing changed yet.
+- Also compatible with Zope 2.10/2.11
 
 
 0.4 (2011-06-09)

src/affinitic/zamqp/configure.zcml

       <include package="five.dbevent" />
     </configure>
 
-    <subscriber
-        for="zope.processlifetime.IDatabaseOpenedWithRoot"
-        handler=".service.bootStrapSubscriber"/>
+    <configure zcml:condition="installed zope.processlifetime">
+      <subscriber
+          for="zope.processlifetime.IDatabaseOpenedWithRoot"
+          handler=".service.bootStrapSubscriber"/>
+      </configure>
+
+    <configure zcml:condition="installed zope.app.appsetup">
+      <subscriber
+          for="zope.app.appsetup.interfaces.IDatabaseOpenedWithRootEvent"
+          handler=".service.bootStrapSubscriber"/>
+    </configure>
 
     <grok:grok package="."/>
 

src/affinitic/zamqp/processor.py

 from ZODB.POSException import ConflictError
 from zope.component import createObject, queryUtility
 from zope.app.publication.zopepublication import ZopePublication
-from zope.component.hooks import setSite
+try:
+    from zope.component.hooks import setSite
+except ImportError:
+    from zope.app.component.hooks import setSite
 
 from affinitic.zamqp import logger
 from affinitic.zamqp.interfaces import IArrivedMessage, IErrorHandler