Merge branch 'unicode_missing_self' of https://github.com/Telofy/requests into develop

This commit is contained in:
Kenneth Reitz
2012-01-30 09:35:53 -05:00
+1 -8
View File
@@ -771,17 +771,10 @@ class Response(object):
# Decode unicode from given encoding.
try:
content = str(self.content, encoding)
content = str(self.content, encoding, errors='replace')
except (UnicodeError, TypeError):
pass
# Try to fall back:
if not content:
try:
content = str(content, encoding, errors='replace')
except (UnicodeError, TypeError):
pass
return content