[networking] Add module (#2861)

No actual changes - code is only moved around
This commit is contained in:
pukkandan
2023-07-15 14:30:08 +05:30
parent 1b392f905d
commit c365dba843
13 changed files with 587 additions and 500 deletions

View File

@@ -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)