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

Sidnei da Silva sidnei at x3ng.com.br
Thu Aug 7 12:29:54 EDT 2003


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

Modified Files:
	utility.py 
Log Message:
Another fix. XXX Write more tests for this code

=== Zope3/src/zope/app/services/utility.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/services/utility.py:1.13	Wed Aug  6 17:16:41 2003
+++ Zope3/src/zope/app/services/utility.py	Thu Aug  7 11:29:48 2003
@@ -111,15 +111,17 @@
     def getUtilitiesFor(self, interface=None):
         utilities = {}
         for name in self._utilities:
-            for iface, cr in self._utilities[reg_name].getRegisteredMatching():
+            for iface, cr in self._utilities[name].getRegisteredMatching():
                 if not cr:
                     continue
                 if interface and not iface is interface:
                     continue
+                cr = ContextWrapper(cr, self)
                 utility = cr.active().getComponent()
                 utilities[(name, utility)] = None
 
         next = getNextService(self, "Utilities")
+
         for utility in next.getUtilitiesFor(interface):
             if not utilities.has_key(utility):
                 utilities[utility] = None




More information about the Zope3-Checkins mailing list