diff options
author | 180909 <734461790@qq.com> | 2021-12-07 00:10:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-07 00:10:49 (GMT) |
commit | c5c365220ed2c867fe81078f70b827de22db2ee6 (patch) | |
tree | 5abbab1d033b387c13019f5f353fa916496395ca /Lib | |
parent | b7ef27bc084665ce58d89fc69530c6f9d2d37754 (diff) | |
download | cpython-c5c365220ed2c867fe81078f70b827de22db2ee6.zip cpython-c5c365220ed2c867fe81078f70b827de22db2ee6.tar.gz cpython-c5c365220ed2c867fe81078f70b827de22db2ee6.tar.bz2 |
bpo-28953: Use `raise from` when raising new IncompleteRead (GH-29861)
Automerge-Triggered-By: GH:asvetlov
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/http/client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py index a6ab135..f54172f 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -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 |