projects
/
twitter-api-cdsw-solutions
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed everything to ASCII. I'm worried we'll lose the forest for the \u1f332
[twitter-api-cdsw-solutions]
/
tweepy
/
models.py
diff --git
a/tweepy/models.py
b/tweepy/models.py
index 1338ab456b37227d895f2128af9942e79417edd0..9b70070887bbb6fa48ea03d15f161cac4f513c3e 100644
(file)
--- a/
tweepy/models.py
+++ b/
tweepy/models.py
@@
-69,6
+69,11
@@
class Status(Model):
def parse(cls, api, json):
status = cls(api)
for k, v in json.items():
def parse(cls, api, json):
status = cls(api)
for k, v in json.items():
+
+ # Hack by guyrt to fix unicode issues, which we do *not* want to teach.
+ if isinstance(v, basestring):
+ v = v.encode('ascii', errors='ignore')
+
if k == 'user':
user_model = getattr(api.parser.model_factory, 'user') if api else User
user = user_model.parse(api, v)
if k == 'user':
user_model = getattr(api.parser.model_factory, 'user') if api else User
user = user_model.parse(api, v)
Benjamin Mako Hill
||
Want to submit a patch?