[Zope3-checkins] CVS: Zope3/src/zope/app/services - event.py:1.28

Steve Alexander steve@cat-box.net
Mon, 16 Jun 2003 16:32:53 -0400


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

Modified Files:
	event.py 
Log Message:
Fix to collector issue 168.

  http://collector.zope.org/Zope3-dev/168

todo:

  * make sure the code is covered by a unit or functional test

  * make the module-level calls be described by an interface and validated
    against that interface


=== Zope3/src/zope/app/services/event.py 1.27 => 1.28 ===
--- Zope3/src/zope/app/services/event.py:1.27	Sat Jun  7 01:31:58 2003
+++ Zope3/src/zope/app/services/event.py	Mon Jun 16 16:32:53 2003
@@ -62,11 +62,12 @@
     return getSubscriptionService(context).unsubscribe(
         subscriber, event_type, filter)
 
-def unsubscribeAll(subscriber, event_type=IEvent, context=None):
+def unsubscribeAll(subscriber, event_type=IEvent, context=None,
+                   local_only=False):
     if context is None and not isinstance(subscriber, (int, str, unicode)):
         context = subscriber
     return getSubscriptionService(context).unsubscribeAll(
-        subscriber, event_type)
+        subscriber, event_type, local_only=local_only)
 
 def iterSubscriptions(subscriber=None, event_type=None, local_only=False,
                       context=None):
@@ -216,6 +217,7 @@
             paths = clean_self._paths
             while paths:
                 path = iter(paths).next()
+                # XXX This code path needs a unit test!
                 unsubscribeAll(path, local_only=True)
         finally:
             del clean_self._v_ssecunbinding