mirror of https://github.com/python/cpython
bpo-28953: Use `raise from` when raising new IncompleteRead (GH-29861)
Automerge-Triggered-By: GH:asvetlov
This commit is contained in:
parent
b7ef27bc08
commit
c5c365220e
|
@ -593,8 +593,8 @@ class HTTPResponse(io.BufferedIOBase):
|
|||
amt -= chunk_left
|
||||
self.chunk_left = 0
|
||||
return b''.join(value)
|
||||
except IncompleteRead:
|
||||
raise IncompleteRead(b''.join(value))
|
||||
except IncompleteRead as exc:
|
||||
raise IncompleteRead(b''.join(value)) from exc
|
||||
|
||||
def _readinto_chunked(self, b):
|
||||
assert self.chunked != _UNKNOWN
|
||||
|
|
Loading…
Reference in New Issue