[Zope3-checkins] CVS: Zope3/src/zope/interface - adapter.py:1.5.4.1
Chris McDonough
chrism@zope.com
Sun, 22 Jun 2003 21:07:04 -0400
Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv27109/src/zope/interface
Modified Files:
Tag: pluggable_authentication_service-branch
adapter.py
Log Message:
Fix lying error message about accepting None to provides.
=== Zope3/src/zope/interface/adapter.py 1.5 => 1.5.4.1 ===
--- Zope3/src/zope/interface/adapter.py:1.5 Wed May 21 13:26:39 2003
+++ Zope3/src/zope/interface/adapter.py Sun Jun 22 21:07:03 2003
@@ -69,12 +69,13 @@
def register(self, require, provide, object):
+
if require is not None and not IInterface.isImplementedBy(require):
raise TypeError(
"The require argument must be an interface (or None)")
if not IInterface.isImplementedBy(provide):
raise TypeError(
- "The provide argument must be an interface (or None)")
+ "The provide argument must be an interface")
# Invalidate our cache
self._v_cache = {}