mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
fix bytes
This commit is contained in:
+2
-2
@@ -18,7 +18,7 @@ import zlib
|
||||
|
||||
from .compat import parse_http_list as _parse_list_header
|
||||
from .compat import quote, unquote, cookielib, SimpleCookie, is_py2
|
||||
from .compat import basestring
|
||||
from .compat import basestring, bytes
|
||||
|
||||
|
||||
def dict_from_string(s):
|
||||
@@ -395,7 +395,7 @@ def stream_decompress(iterator, mode='gzip'):
|
||||
yield chunk
|
||||
else:
|
||||
# Make sure everything has been returned from the decompression object
|
||||
buf = dec.decompress('')
|
||||
buf = dec.decompress(bytes())
|
||||
rv = buf + dec.flush()
|
||||
if rv:
|
||||
yield rv
|
||||
|
||||
Reference in New Issue
Block a user