[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - registrationstack.py:1.3

Fred L. Drake, Jr. fred@zope.com
Wed, 2 Jul 2003 17:37:59 -0400


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

Modified Files:
	registrationstack.py 
Log Message:
This stub implementation of the registration stack didn't handle
activate(None), but we actually use that now.


=== Zope3/src/zope/app/services/tests/registrationstack.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/services/tests/registrationstack.py:1.2	Sun Jun 22 20:31:31 2003
+++ Zope3/src/zope/app/services/tests/registrationstack.py	Wed Jul  2 17:37:54 2003
@@ -61,6 +61,11 @@
         return cid in self._data
 
     def activate(self, registration):
+        if registration is None:
+            self._data = (None,) + filter(None, self._data)
+            if self._data[-1] is None:
+                self._data = self._data[:-1]
+            return
         cid = registration.id
         if self._data[0] == cid:
             return # already active