[Zope3-checkins] CVS: Zope3/src/zope/app/container - constraints.py:1.3

Jim Fulton cvs-admin at zope.org
Thu Dec 4 08:48:06 EST 2003


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

Modified Files:
	constraints.py 
Log Message:
Fixed a bug in ContainerTypesConstraint that caused the constraints to
always return false (or fail), so that the constraint was never
satisfied.


=== Zope3/src/zope/app/container/constraints.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/container/constraints.py:1.2	Wed Dec  3 00:41:19 2003
+++ Zope3/src/zope/app/container/constraints.py	Thu Dec  4 08:48:01 2003
@@ -315,6 +315,7 @@
 
     >>> zope.interface.classImplements(Ob, I2)
     >>> constraint(Ob())
+    True
        
     """ 
 
@@ -324,6 +325,6 @@
     def __call__(self, object):
        for iface in self.types:
            if iface.isImplementedBy(object):
-               return
+               return True
        else:
            raise InvalidContainerType(object, self.types)




More information about the Zope3-Checkins mailing list