diff roundup/cgi/form_parser.py @ 4269:ab4563e97d22

corrections for python2.3 compatibility: - rename testdata in test/test_anypy_hashlib.py, python2.3 testsuite will try to execute anything that starts with "test". - fix generator expressions in roundup/admin.py - fix sort calls with key attribute, use a standard (slower) compare function instead - Add 'sqlite' to ImportError exceptions when searching for backends
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Fri, 09 Oct 2009 14:32:21 +0000
parents a412ce8ccf6f
children 693c75d56ebe
line wrap: on
line diff
--- a/roundup/cgi/form_parser.py	Fri Oct 09 14:00:50 2009 +0000
+++ b/roundup/cgi/form_parser.py	Fri Oct 09 14:32:21 2009 +0000
@@ -427,7 +427,7 @@
                     value = existing
                     # Sort the value in the same order used by
                     # Multilink.from_raw.
-                    value.sort(key = lambda x: int(x))
+                    value.sort(lambda x, y: cmp(int(x),int(y)))
 
             elif value == '':
                 # other types should be None'd if there's no value
@@ -491,7 +491,7 @@
                 # The canonical order (given in Multilink.from_raw) is
                 # by the numeric value of the IDs.
                 if isinstance(proptype, hyperdb.Multilink):
-                    existing.sort(key = lambda x: int(x))
+                    existing.sort(lambda x, y: cmp(int(x),int(y)))
 
                 # "missing" existing values may not be None
                 if not existing:

Roundup Issue Tracker: http://roundup-tracker.org/