[Secure-testing-commits] r22380 - lib/python
Florian Weimer
fw at alioth.debian.org
Tue May 28 04:59:31 UTC 2013
Author: fw
Date: 2013-05-28 04:59:30 +0000 (Tue, 28 May 2013)
New Revision: 22380
Modified:
lib/python/web_support.py
Log:
web_support.URLFactory._convertArgs: handle both lists of values and strings
urllib.urlquote in Python 2.6 is more picky about its argument.
Modified: lib/python/web_support.py
===================================================================
--- lib/python/web_support.py 2013-05-27 21:14:51 UTC (rev 22379)
+++ lib/python/web_support.py 2013-05-28 04:59:30 UTC (rev 22380)
@@ -163,8 +163,11 @@
for (key, value) in args.items():
if value is None:
continue
- arglist.append("%s=%s" % (urllib.quote(key),
- urllib.quote(value)))
+ if type(value) not in (types.ListType, types.StringType):
+ value = (value,)
+ for v in value:
+ arglist.append("%s=%s" % (urllib.quote(key),
+ urllib.quote(v)))
if arglist:
return "?" + '&'.join(arglist)
else:
More information about the Secure-testing-commits
mailing list