projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
319b1ed
)
The `self` was missing again, and I think the two blocks were redundant.
author
Telofy
<drescher@retresco.de>
Mon, 30 Jan 2012 11:23:43 +0000
(12:23 +0100)
committer
Telofy
<drescher@retresco.de>
Mon, 30 Jan 2012 11:23:43 +0000
(12:23 +0100)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index
7ac85cc
..
7126f08
100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-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