mirror of
https://github.com/python/cpython.git
synced 2025-07-25 20:24:11 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -593,8 +593,8 @@ class HTTPResponse(io.BufferedIOBase):
|
||||||
amt -= chunk_left
|
amt -= chunk_left
|
||||||
self.chunk_left = 0
|
self.chunk_left = 0
|
||||||
return b''.join(value)
|
return b''.join(value)
|
||||||
except IncompleteRead:
|
except IncompleteRead as exc:
|
||||||
raise IncompleteRead(b''.join(value))
|
raise IncompleteRead(b''.join(value)) from exc
|
||||||
|
|
||||||
def _readinto_chunked(self, b):
|
def _readinto_chunked(self, b):
|
||||||
assert self.chunked != _UNKNOWN
|
assert self.chunked != _UNKNOWN
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue