From 1263f8da11df542d29e61bb2f680bc2d3f0bfe68 Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Sun, 6 Aug 2023 23:42:58 -0400 Subject: [PATCH] fix wheel errors --- src/pip/_internal/network/lazy_wheel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pip/_internal/network/lazy_wheel.py b/src/pip/_internal/network/lazy_wheel.py index f5520b4565c..08301d3d92c 100644 --- a/src/pip/_internal/network/lazy_wheel.py +++ b/src/pip/_internal/network/lazy_wheel.py @@ -191,10 +191,10 @@ def read(self, size: int = -1) -> bytes: cur = self.tell() if size < 0: assert cur <= self._length - size = self._length - cur + download_size = self._length - cur else: - size = max(size, self._chunk_size) - stop = min(cur + size, self._length) + download_size = max(size, self._chunk_size) + stop = min(cur + download_size, self._length) self._download(cur, stop - 1) return self._file.read(size)