[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog -
Catalog.py:1.111.2.5
Sidnei da Silva
sidnei at awkly.org
Mon Apr 26 11:43:03 EDT 2004
Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv13554/lib/python/Products/ZCatalog
Modified Files:
Tag: Zope-2_7-branch
Catalog.py
Log Message:
- Display index name on error message when index can't be used as
'sort_on'.
- PUT would fail if the created object had a __len__ = 0 (eg:
BTreeFolder2) and fallback to _default_put_factory. Fix by
checking if the returned object is None instead.
=== Zope/lib/python/Products/ZCatalog/Catalog.py 1.111.2.4 => 1.111.2.5 ===
--- Zope/lib/python/Products/ZCatalog/Catalog.py:1.111.2.4 Mon Nov 17 17:34:13 2003
+++ Zope/lib/python/Products/ZCatalog/Catalog.py Mon Apr 26 11:42:32 2004
@@ -726,12 +726,12 @@
# self.indexes is always a dict, so get() w/ 1 arg works
sort_index = self.indexes.get(sort_index_name)
if sort_index is None:
- raise CatalogError, 'Unknown sort_on index'
+ raise CatalogError, 'Unknown sort_on index (%s)' % sort_index_name
else:
if not hasattr(sort_index, 'keyForDocument'):
raise CatalogError(
- 'The index chosen for sort_on is not capable of being'
- ' used as a sort index.'
+ 'The index chosen for sort_on (%s) is not capable of being'
+ ' used as a sort index.' % sort_index_name
)
return sort_index
else:
More information about the Zope-Checkins
mailing list