]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/networking/_urllib.py
[cleanup] Misc (#8182)
[yt-dlp.git] / yt_dlp / networking / _urllib.py
index c327f7744ebb2e4cb685ec3452a40786e9f9a982..9e2bf33e45d24d0625629c46b9495bce86442dba 100644 (file)
@@ -337,7 +337,7 @@ def handle_sslerror(e: ssl.SSLError):
 
 def handle_response_read_exceptions(e):
     if isinstance(e, http.client.IncompleteRead):
-        raise IncompleteRead(partial=e.partial, cause=e, expected=e.expected) from e
+        raise IncompleteRead(partial=len(e.partial), cause=e, expected=e.expected) from e
     elif isinstance(e, ssl.SSLError):
         handle_sslerror(e)
     elif isinstance(e, (OSError, EOFError, http.client.HTTPException, *CONTENT_DECODE_ERRORS)):