From 066b118e641ad612106eca4904c307e4c128e00e Mon Sep 17 00:00:00 2001 From: kmarty Date: Mon, 1 Dec 2014 17:50:16 +0100 Subject: Better solution how to change unicode string to string. --- module/network/HTTPChunk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module') diff --git a/module/network/HTTPChunk.py b/module/network/HTTPChunk.py index 047ccc5a0..4ba819615 100644 --- a/module/network/HTTPChunk.py +++ b/module/network/HTTPChunk.py @@ -261,7 +261,7 @@ class HTTPChunk(HTTPRequest): # extended version according to RFC 6266 and RFC 5987. encoding = line.partition("*=")[2].partition("''")[0] name = orgline.partition("''")[2] - name = urllib.unquote(name.encode('ascii')).decode(charEnc(encoding)) + name = urllib.unquote(str(name)).decode(charEnc(encoding)) else: # basic version, US-ASCII only name = orgline.partition("filename=")[2] -- cgit v1.2.3