[Zope-Checkins] CVS: Zope3/lib/python/Zope/ComponentArchitecture - IToIRegistry.py:1.1.4.5
Jim Fulton
jim@zope.com
Sun, 6 Jan 2002 18:42:31 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/ComponentArchitecture
In directory cvs.zope.org:/tmp/cvs-serv9067
Modified Files:
Tag: Zope-3x-branch
IToIRegistry.py
Log Message:
Changed to avoid providing components for Interface.Interface.
=== Zope3/lib/python/Zope/ComponentArchitecture/IToIRegistry.py 1.1.4.4 => 1.1.4.5 ===
"""
+from Interface import Interface
from Interface.Util import objectImplements
from Exceptions import Invalid
@@ -30,6 +31,9 @@
reg[(require, provide)] = (primary_provide, c)
bases = getattr(provide, '__bases__', ())
for base in bases:
+ if base is Interface:
+ # Never register the say-nothing Interface.
+ continue
existing = reg.get((require, base), None)
if existing is not None:
existing_provide = existing[0]