mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
settings.allow_unicode
This commit is contained in:
@@ -62,6 +62,7 @@ settings.proxies = None
|
||||
settings.verbose = None
|
||||
settings.timeout = None
|
||||
settings.max_redirects = 30
|
||||
settings.allow_unicode = True
|
||||
|
||||
#: Use socket.setdefaulttimeout() as fallback?
|
||||
settings.timeout_fallback = True
|
||||
|
||||
+1
-5
@@ -453,12 +453,8 @@ class Response(object):
|
||||
pass
|
||||
|
||||
# Decode unicode content.
|
||||
try:
|
||||
if settings.allow_unicode:
|
||||
self._content = get_unicode_from_response(self)
|
||||
# Don't trust this stuff.
|
||||
except UserWarning, e:
|
||||
print e
|
||||
|
||||
|
||||
return self._content
|
||||
|
||||
|
||||
Reference in New Issue
Block a user