[Zope3-checkins] CVS: Zope3/src/zope/app/services - interface.py:1.14

Sidnei da Silva sidnei at x3ng.com.br
Sat Aug 9 15:09:37 EDT 2003


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

Modified Files:
	interface.py 
Log Message:
Make sure only utilities providing IInterface get in the mix.

=== Zope3/src/zope/app/services/interface.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/services/interface.py:1.13	Fri Aug  8 16:47:47 2003
+++ Zope3/src/zope/app/services/interface.py	Sat Aug  9 14:09:32 2003
@@ -23,7 +23,7 @@
 from zodb.code.patch import registerWrapper, Wrapper
 from zope.interface.interface import InterfaceClass
 from zope.interface.interfaces import IInterface
-from zope.interface import Interface
+from zope.interface import Interface, providedBy
 from zope.component import getService
 from zope.app.component.nextservice import getNextService
 from zope.app.interfaces.services.service import ISimpleService
@@ -120,6 +120,8 @@
             interface = IInterface
         utilities = getService(self, Utilities)
         matching = utilities.getUtilitiesFor(interface)
+        matching = [m for m in matching
+                    if IInterface in providedBy(m[1])]
         if search_string is not None:
             return [match for match in matching
                     if match[0].find(search_string) > -1]




More information about the Zope3-Checkins mailing list