kopia lustrzana https://github.com/jointakahe/takahe
catch both SSLError in addition to SSLCertVerificationError as we can't
locally do anything about remote negotiation problems. Passes pre-commit lint now.pull/595/head
rodzic
f0bc0d8bed
commit
defd07944e
|
@ -1,10 +1,10 @@
|
|||
import base64
|
||||
import json
|
||||
from ssl import SSLCertVerificationError, SSLError
|
||||
from typing import Literal, TypedDict, cast
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import httpx
|
||||
from ssl import SSLError, SSLCertVerificationError
|
||||
from cryptography.exceptions import InvalidSignature
|
||||
from cryptography.hazmat.primitives import hashes, serialization
|
||||
from cryptography.hazmat.primitives.asymmetric import padding, rsa
|
||||
|
@ -18,6 +18,7 @@ from pyld import jsonld
|
|||
|
||||
from core.ld import format_ld_date
|
||||
|
||||
|
||||
class VerificationError(BaseException):
|
||||
"""
|
||||
There was an error with verifying the signature
|
||||
|
|
|
@ -172,7 +172,7 @@ class Domain(StatorModel):
|
|||
)
|
||||
except httpx.HTTPError:
|
||||
pass
|
||||
except ssl.SSLCertVerificationError:
|
||||
except (ssl.SSLCertVerificationError, ssl.SSLError):
|
||||
return None
|
||||
else:
|
||||
try:
|
||||
|
|
Ładowanie…
Reference in New Issue