1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-04 00:55:15 +00:00

[rh:requests] Handle both bytes and int for IncompleteRead.partial (Fix 8a8b54523a) (#8348)

Authored by: bashonly, coletdjnz, Grub4K
This commit is contained in:
Simon Sawicki
2023-10-15 10:54:38 +02:00
committed by GitHub
parent 8a8b54523a
commit 4e38e2ae9d
3 changed files with 7 additions and 8 deletions

View File

@ -75,7 +75,7 @@ class HTTPError(RequestError):
class IncompleteRead(TransportError):
def __init__(self, partial: int, expected: int = None, **kwargs):
def __init__(self, partial: int, expected: int | None = None, **kwargs):
self.partial = partial
self.expected = expected
msg = f'{partial} bytes read'