mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
The self was missing again, and I think the two blocks were redundant.
This commit is contained in:
+1
-8
@@ -773,17 +773,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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user