diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2023-07-15 14:30:08 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2023-07-15 16:18:34 +0530 |
commit | c365dba8430ee33abda85d31f95128605bf240eb (patch) | |
tree | 174d35c23267863ca89a1a030935b445edf56799 /yt_dlp/networking/exceptions.py | |
parent | 1b392f905d20ef1f1b300b180f867d43c9ce49b8 (diff) | |
download | hypervideo-pre-c365dba8430ee33abda85d31f95128605bf240eb.tar.lz hypervideo-pre-c365dba8430ee33abda85d31f95128605bf240eb.tar.xz hypervideo-pre-c365dba8430ee33abda85d31f95128605bf240eb.zip |
[networking] Add module (#2861)
No actual changes - code is only moved around
Diffstat (limited to 'yt_dlp/networking/exceptions.py')
-rw-r--r-- | yt_dlp/networking/exceptions.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/yt_dlp/networking/exceptions.py b/yt_dlp/networking/exceptions.py new file mode 100644 index 000000000..89b484a22 --- /dev/null +++ b/yt_dlp/networking/exceptions.py @@ -0,0 +1,9 @@ +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) |