[Zope-Checkins] SVN: Products.Five/trunk/site/utility.py A glitch
when merging ment I missed the last checkin on the branch.
Lennart Regebro
regebro at gmail.com
Sun Feb 26 16:01:12 EST 2006
Log message for revision 65502:
A glitch when merging ment I missed the last checkin on the branch.
Changed:
U Products.Five/trunk/site/utility.py
-=-
Modified: Products.Five/trunk/site/utility.py
===================================================================
--- Products.Five/trunk/site/utility.py 2006-02-26 20:57:00 UTC (rev 65501)
+++ Products.Five/trunk/site/utility.py 2006-02-26 21:01:12 UTC (rev 65502)
@@ -53,8 +53,12 @@
"""
if getattr(aq_base(self.context), 'utilities', None) is not None:
for id, utility in self.context.utilities.objectItems():
- if (interface.providedBy(utility) and
- (name == '' or id.endswith(name))):
+ if interface.providedBy(utility):
+ if id.find('-') != -1:
+ prefix, utility_name = id.split('-', 1)
+ else:
+ utility_name = ''
+ if name == utility_name:
return utility
return self.next.queryUtility(interface, name, default)
More information about the Zope-Checkins
mailing list