[Zope3-checkins] CVS: Zope3/src/zope/app/component -
globalinterfaceservice.py:1.15
Sidnei da Silva
sidnei at x3ng.com.br
Sat Aug 9 15:11:30 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/component
In directory cvs.zope.org:/tmp/cvs-serv17454
Modified Files:
globalinterfaceservice.py
Log Message:
Make sure only utilities providing IInterface get in the mix.
=== Zope3/src/zope/app/component/globalinterfaceservice.py 1.14 => 1.15 ===
--- Zope3/src/zope/app/component/globalinterfaceservice.py:1.14 Wed Aug 6 17:16:35 2003
+++ Zope3/src/zope/app/component/globalinterfaceservice.py Sat Aug 9 14:11:25 2003
@@ -22,7 +22,7 @@
from zope.component import getService
from zope.app.interfaces.component import IGlobalInterfaceService
from zope.app.services.servicenames import Utilities
-from zope.interface import implements
+from zope.interface import implements, providedBy
from zope.interface.interfaces import IInterface
from zope.component.utility import utilityService
@@ -89,6 +89,8 @@
# tests that do too basic setup to get the utilities
# service started. I'll fix this later
matching = utilityService.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