--- controllers.py.old 2007-07-25 20:37:35.000000000 +0200
+++ controllers.py 2007-07-25 20:36:38.000000000 +0200
@@ -496,9 +496,14 @@
for key, value in tgparams.iteritems():
if value is None:
continue
- if isinstance(value, unicode):
- value = value.encode("utf8")
- args.append("%s=%s" % (k, urllib.quote(str(v))))
+ if type(value) == list:
+ pairs = [(key, v) for v in value]
+ else:
+ pairs = [(key, value)]
+ for (k,v) in pairs:
+ if isinstance(value, unicode):
+ value = value.encode("utf8")
+ args.append("%s=%s" % (k, urllib.quote(str(v))))
if args:
result += "?" + "&".join(args)
return result
regards
Stefan
Looks good. Care to create a patch [1] and maybe a test in
tests/test_controller.py as well and put it in a ticket?
I would make one small change:
- args.append("%s=%s" % (k, urllib.quote(str(v))))
+ if isinstance(value, (list, tuple)):
Be sure to do "svn update" before you create the patch because I have
just changed that function.
Chris
The patch includes the change, a test case and an addition to the
description of the function.
regards
Stefan
Applied in r3383 and r3385. Thanks!
Chris