diff --git a/Lib/http/client.py b/Lib/http/client.py index a6ab135b2c3879b..f54172fd0deeaed 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -593,8 +593,8 @@ def _read_chunked(self, amt=None): 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