projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7ac5d8
)
Fix tweepy.API.update_with_madia
author
Katsunori SUZUI
<kt@7kry.net>
Fri, 13 Jun 2014 09:29:45 +0000
(18:29 +0900)
committer
Katsunori SUZUI
<kt@7kry.net>
Fri, 13 Jun 2014 09:29:45 +0000
(18:29 +0900)
`filename` have to be percent-encoded whichever it is an instance of
`unicode` or an instance of `str`.
tweepy/api.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/api.py
b/tweepy/api.py
index 921820882f71d4b6c75fa87d8faa4ab06306ddd1..43c46e84fe6e962447872724830247511e0e9084 100644
(file)
--- a/
tweepy/api.py
+++ b/
tweepy/api.py
@@
-790,7
+790,8
@@
class API(object):
raise TweepError('Invalid file type for image: %s' % file_type)
if isinstance(filename, unicode):
- filename = urllib.quote(filename.encode("utf-8"))
+ filename = filename.encode("utf-8")
+ filename = urllib.quote(filename)
BOUNDARY = 'Tw3ePy'