[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - Catalog.py:1.91

Florent Guillaume fg@nuxeo.com
Mon, 29 Jul 2002 20:07:33 +0000 (UTC)


Martijn Pieters  <mj@zope.com> wrote:
> Remove useless interpolation of None into string.
> === Zope/lib/python/Products/ZCatalog/Catalog.py 1.90 => 1.91 ===
>              # self.indexes is always a dict, so get() w/ 1 arg works
>              sort_index = self.indexes.get(sort_index)
>              if sort_index is None:
> -                raise CatalogError, ('Unknown sort_on index %s' % sort_index)
> +                raise CatalogError, ('Unknown sort_on index')
>              else:
>                  if not hasattr(sort_index, 'keyForDocument'):
>                      raise CatalogError(

The intent was probably to display the original sort_index that wasn't
found, that'd be a useful error message.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com