Fix tweepy.API.update_with_madia
authorKatsunori SUZUI <kt@7kry.net>
Fri, 13 Jun 2014 09:29:45 +0000 (18:29 +0900)
committerAaron Hill <aa1ronham@gmail.com>
Tue, 1 Jul 2014 11:55:25 +0000 (07:55 -0400)
`filename` have to be percent-encoded whichever it is an instance of
`unicode` or an instance of `str`.

tweepy/api.py

index 90946a369fc42b703ea2136d8c6ac8840682220e..997a8d0c957c5a5b94d637c277e1b30efedf9b76 100644 (file)
@@ -1232,7 +1232,7 @@ class API(object):
 
         if isinstance(filename, unicode):
             filename = filename.encode("utf-8")
-        filename = urllib.quote(filename)
+        filename = filename.encode("utf-8")
 
         BOUNDARY = 'Tw3ePy'
         body = []