[Zope3-checkins] CVS: Zope3/src/zope/app/event - globalservice.py:1.4

Steve Alexander steve@cat-box.net
Mon, 27 Jan 2003 13:51:33 -0500


Update of /cvs-repository/Zope3/src/zope/app/event
In directory cvs.zope.org:/tmp/cvs-serv16811/src/zope/app/event

Modified Files:
	globalservice.py 
Log Message:
Fixed subscriber that didn't declare itsself to be an ISubscriber.



=== Zope3/src/zope/app/event/globalservice.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/event/globalservice.py:1.3	Mon Jan 27 13:39:48 2003
+++ Zope3/src/zope/app/event/globalservice.py	Mon Jan 27 13:51:00 2003
@@ -235,16 +235,7 @@
         for subscriber, filter in subscriptions:
             if filter is not None and not filter(event):
                 continue
-            # getAdapter(subscriber, ISubscriber).notify(event)
-            # XXX This has affected more than it should have done.
-            #     I'll put the proper code back when I've cleaned everything
-            #     up.
-            adapter = queryAdapter(subscriber, ISubscriber)
-            if adapter is not None:
-               adapter.notify(event)
-            else:
-               subscriber.notify(event)
-
+            queryAdapter(subscriber, ISubscriber).notify(event)
 
 class GlobalEventChannel(GlobalSubscribable):