[Zope-Checkins] CVS: Zope3/lib/python/Zope/ObjectHub - ObjectHub.py:1.3

Holger Krekel hpk@devel.trillke.net
Mon, 24 Jun 2002 11:07:04 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/ObjectHub
In directory cvs.zope.org:/tmp/cvs-serv29938

Modified Files:
	ObjectHub.py 
Log Message:
- ObjectHub now takes RuidObjectEvents in the notify method.
- Added a unittest to check that RuidObjectEvents are
  accepted and transmitted.

Godefroid and Holger


=== Zope3/lib/python/Zope/ObjectHub/ObjectHub.py 1.2 => 1.3 ===
 from RuidObjectEvent import RuidObjectContextChangedEvent
 from RuidObjectEvent import RuidObjectRemovedEvent
+from IRuidObjectEvent import IRuidObjectEvent
 
 from Zope.Exceptions import NotFoundError
 from Persistence import Persistent
@@ -93,7 +94,10 @@
                               
         elif IObjectRemovedEvent.isImplementedBy(event):
             self._objectRemoved(event.getLocation(), event.getObject())
-            
+        
+        elif IRuidObjectEvent.isImplementedBy(event):
+            self.__eventchannel.notify(event)
+
         # otherwise, ignore the event
 
     def lookupRuid(self, location):