[Zope3-checkins] CVS: Zope3/src/zope/app/services - event.py:1.30
Steve Alexander
steve@cat-box.net
Mon, 16 Jun 2003 16:40:44 -0400
Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv16583/src/zope/app/services
Modified Files:
event.py
Log Message:
Added further comment now I've looked more closely at the code, and
realize that it is doing the wrong thing in any but the most usual
conditions.
=== Zope3/src/zope/app/services/event.py 1.29 => 1.30 ===
--- Zope3/src/zope/app/services/event.py:1.29 Mon Jun 16 16:35:47 2003
+++ Zope3/src/zope/app/services/event.py Mon Jun 16 16:40:44 2003
@@ -213,12 +213,20 @@
while hubIds:
hubId = iter(hubIds).next()
# XXX This code path needs a unit test!
+ # This code is also wrong.
+ # The call to unsubscribeAll assumes that we are using
+ # the subscriptions service. In fact, this could be
+ # any service that implements ISubscriptionService.
+ # The appropriate service should be sought using
+ # self._subscribeToServiceName, and unsubscribeAll
+ # should be called on that service.
unsubscribeAll(hubId, local_only=True)
paths = clean_self._paths
while paths:
path = iter(paths).next()
# XXX This code path needs a unit test!
+ # Also, see comment above.
unsubscribeAll(path, local_only=True)
finally:
del clean_self._v_ssecunbinding