[Pkg-zope-developers] Bug#329380: zope2.7: Bug with the function
strcoll_nocase
Frederic MASSOT
frederic at juliana-multimedia.com
Wed Sep 21 13:36:38 UTC 2005
Package: zope2.7
Version: 2.7.5-2
Severity: normal
Tags: patch l10n
Hi,
This version of Zope does not make it possible to sort a sequence with
the strcoll_nocase function.
Script python below generates an error :
result = context.portal_catalog.searchResults(query)
sort_on_pr = (("Title","strcoll_nocase","asc"),)
result_sort = sequence.sort(result, sort_on_pr)
The error message :
File "/usr/lib/zope2.7/lib/python/DocumentTemplate/sequence/SortEx.py",
line 66, in sort
sf_list = make_sortfunctions(sortfields, _)
File "/usr/lib/zope2.7/lib/python/DocumentTemplate/sequence/SortEx.py",
line 173, in make_sortfunctions
func = strcoll_nocase
NameError: global name 'strcoll_nocase' is not defined
This problem is solved into import the locale module in the file
"/usr/lib/zope2.7/lib/python/DocumentTemplate/sequence/SortEx.py"
at line 137 :
import sys
import locale
if sys.modules.has_key("locale"): # only if locale is already imported
from locale import strcoll
Regards.
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.11
Locale: LANG=fr_FR at euro, LC_CTYPE=fr_FR at euro (charmap=ISO-8859-15)
Versions of packages zope2.7 depends on:
ii adduser 3.63 Add and remove users and groups
ii debconf 1.4.30.13 Debian configuration management sy
ii dpkg 1.10.28 Package maintenance system for Deb
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii python2.3 2.3.5-3 An interactive high-level object-o
ii python2.3-xml 0.8.4-1 XML tools for Python (2.3.x)
-- debconf information:
zope/upgrade/2.7:
* zope/tips/2.7:
* zope/tips/standalone_install:
* zope/instance_home/move: true
* shared/zope/restart: end
More information about the Pkg-zope-developers
mailing list