Response.content minor perf improvement

This commit is contained in:
Ofek Lev
2018-05-26 18:20:27 -04:00
committed by GitHub
parent fe8290b3d0
commit c1b828bc95
+1 -1
View File
@@ -824,7 +824,7 @@ class Response(object):
if self.status_code == 0 or self.raw is None:
self._content = None
else:
self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
self._content_consumed = True
# don't need to release the connection; that's been handled by urllib3