diff -r 5bd248c2cc75 Lib/http/client.py --- a/Lib/http/client.py Mon Dec 12 11:17:59 2016 -0800 +++ b/Lib/http/client.py Mon Dec 12 23:38:30 2016 +0200 @@ -566,8 +566,8 @@ value.append(self._safe_read(chunk_left)) self.chunk_left = 0 return b''.join(value) - except IncompleteRead: - raise IncompleteRead(b''.join(value)) + except IncompleteRead as incomplete_read: + raise IncompleteRead(b''.join(value)) from incomplete_read def _readinto_chunked(self, b): assert self.chunked != _UNKNOWN