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

Guido van Rossum guido@python.org
Tue, 29 Apr 2003 12:25:26 -0400


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

Modified Files:
	utility.py 
Log Message:
getRegisteredMatching() should skip empty configuration registries.

XXX disturbing: there's no unit test for this; I'll add one next.


=== Zope3/src/zope/app/services/utility.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/services/utility.py:1.4	Mon Apr 28 11:21:08 2003
+++ Zope3/src/zope/app/services/utility.py	Tue Apr 29 12:25:25 2003
@@ -97,6 +97,8 @@
         L = []
         for name in self._utilities:
             for iface, cr in self._utilities[name].getRegisteredMatching():
+                if not cr:
+                    continue
                 L.append((iface, name, ContextWrapper(cr, self)))
         return L