aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/networking/exceptions.py
diff options
context:
space:
mode:
authorSimon Sawicki <contact@grub4k.xyz>2023-10-15 10:54:38 +0200
committerGitHub <noreply@github.com>2023-10-15 10:54:38 +0200
commit4e38e2ae9d7380015349e6aee59c78bb3938befd (patch)
treedf43cdcff861294329182a9268cff87edae375ed /yt_dlp/networking/exceptions.py
parent8a8b54523addf46dfd50ef599761a81bc22362e6 (diff)
[rh:requests] Handle both `bytes` and `int` for `IncompleteRead.partial` (Fix 8a8b54523addf46dfd50ef599761a81bc22362e6) (#8348)
Authored by: bashonly, coletdjnz, Grub4K
Diffstat (limited to 'yt_dlp/networking/exceptions.py')
-rw-r--r--yt_dlp/networking/exceptions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/networking/exceptions.py b/yt_dlp/networking/exceptions.py
index f58dc246e..12441901c 100644
--- a/yt_dlp/networking/exceptions.py
+++ b/yt_dlp/networking/exceptions.py
@@ -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'