[Zope3-checkins] CVS: Zope3/src/zope/app/observable - observable.py:1.1.2.3

Nathan Yergler nathan at yergler.net
Tue Mar 23 16:24:21 EST 2004


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

Modified Files:
      Tag: observable-branch
	observable.py 
Log Message:
Added check for zero-length require list in subscribe.


=== Zope3/src/zope/app/observable/observable.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/observable/observable.py:1.1.2.2	Tue Mar 23 16:08:29 2004
+++ Zope3/src/zope/app/observable/observable.py	Tue Mar 23 16:24:19 2004
@@ -38,6 +38,9 @@
         return self.dummybase
 
     def subscribe(self, required, provided, subscriber):
+        if len(required) == 0:
+            raise ValueError("required can not be zero length")
+        
         adapters = self.adapters.get(required[0])
         if not adapters:
             adapters = self.adapters[required[0]] = {}




More information about the Zope3-Checkins mailing list