1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-09-05 18:39:37 +02:00
yt-dlp/yt_dlp/networking/exceptions.py
pukkandan c365dba843
[networking] Add module (#2861)
No actual changes - code is only moved around
2023-07-15 16:18:34 +05:30

10 lines
287 B
Python

import http.client
import socket
import ssl
import urllib.error
network_exceptions = [urllib.error.URLError, http.client.HTTPException, socket.error]
if hasattr(ssl, 'CertificateError'):
network_exceptions.append(ssl.CertificateError)
network_exceptions = tuple(network_exceptions)