]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/networking/exceptions.py
[core] Fix support for upcoming Python 3.12 (#8130)
[yt-dlp.git] / yt_dlp / networking / exceptions.py
index 10afc9ccbf1f9bd2f379e6d9b50f460799698d74..465b18ba945489b719578144e68836af6eee74a2 100644 (file)
@@ -115,7 +115,7 @@ def __init__(self, http_error: HTTPError):
             hdrs=http_error.response.headers,
             fp=http_error.response
         )
-        self._closer.file = None  # Disable auto close
+        self._closer.close_called = True  # Disable auto close
         self._http_error = http_error
         HTTPError.__init__(self, http_error.response, redirect_loop=http_error.redirect_loop)