fix linter for the SSLError

pull/595/head
Osma Ahvenlampi 2023-06-30 23:09:21 +03:00
rodzic c67ec4c539
commit f0bc0d8bed
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -249,10 +249,10 @@ class HttpSignature:
content=body_bytes,
follow_redirects=method == "get",
)
except SSLError as e:
except SSLError as invalid_cert:
# Not our problem if the other end doesn't have proper SSL
print(f"{uri} {e}")
raise SSLCertVerificationError(e)
print(f"{uri} {invalid_cert}")
raise SSLCertVerificationError(invalid_cert) from invalid_cert
except InvalidCodepoint as ex:
# Convert to a more generic error we handle
raise httpx.HTTPError(f"InvalidCodepoint: {str(ex)}") from None