]> jfr.im git - yt-dlp.git/blob - yt_dlp/networking/exceptions.py
[networking] Add module (#2861)
[yt-dlp.git] / yt_dlp / networking / exceptions.py
1 import http.client
2 import socket
3 import ssl
4 import urllib.error
5
6 network_exceptions = [urllib.error.URLError, http.client.HTTPException, socket.error]
7 if hasattr(ssl, 'CertificateError'):
8 network_exceptions.append(ssl.CertificateError)
9 network_exceptions = tuple(network_exceptions)