github connection fallback

This commit is contained in:
Flowseal
2026-05-09 16:47:56 +03:00
parent 8269ebe3bb
commit d5abfbf9c2

View File

@@ -77,7 +77,10 @@ class _PinnedHTTPSHandler(urllib.request.HTTPSHandler):
self.sock, server_hostname=self._tunnel_host or self.host
)
return self.do_open(_Conn, req)
try:
return self.do_open(_Conn, req)
except Exception:
return super().https_open(req)
def build_github_opener() -> urllib.request.OpenerDirector: