[Zope3-checkins] CVS: Zope3/src/zope/app/utility - vocabulary.py:1.4
Garrett Smith
garrett at mojave-corp.com
Fri May 7 20:12:18 EDT 2004
Update of /cvs-repository/Zope3/src/zope/app/utility
In directory cvs.zope.org:/tmp/cvs-serv31617/src/zope/app/utility
Modified Files:
vocabulary.py
Log Message:
Fix for bug introduced in last change to this file.
=== Zope3/src/zope/app/utility/vocabulary.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/utility/vocabulary.py:1.3 Fri May 7 19:21:13 2004
+++ Zope3/src/zope/app/utility/vocabulary.py Fri May 7 20:12:17 2004
@@ -27,6 +27,8 @@
from zope.app import zapi
from zope.app.interface.vocabulary import ObjectInterfacesVocabulary
+from interfaces import IUtilityRegistration
+
class UtilityQuery(object):
"""Query object for utilities.
@@ -237,6 +239,8 @@
class UtilityComponentInterfacesVocabulary(ObjectInterfacesVocabulary):
- def __init__(self, registration):
+ def __init__(self, context):
+ if IUtilityRegistration.providedBy(context):
+ context = context.getComponent()
super(UtilityComponentInterfacesVocabulary, self).__init__(
- registration.getComponent())
\ No newline at end of file
+ context)
\ No newline at end of file
More information about the Zope3-Checkins
mailing list