diff options
author | Florian Weimer <fw@deneb.enyo.de> | 2013-05-28 04:59:30 +0000 |
---|---|---|
committer | Florian Weimer <fw@deneb.enyo.de> | 2013-05-28 04:59:30 +0000 |
commit | 4bc4a542e986f443e08403969315549883f4bf6c (patch) | |
tree | 141354ddeb2372fa944b371620992e3c6888225f /lib/python/web_support.py | |
parent | 3e4c9cb648b3d38bc46a50bda318107d62f94d03 (diff) |
web_support.URLFactory._convertArgs: handle both lists of values and strings
urllib.urlquote in Python 2.6 is more picky about its argument.
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@22380 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'lib/python/web_support.py')
-rw-r--r-- | lib/python/web_support.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/python/web_support.py b/lib/python/web_support.py index ae2d852dc6..aea8400036 100644 --- a/lib/python/web_support.py +++ b/lib/python/web_support.py @@ -163,8 +163,11 @@ class URLFactory: 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: |