mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 00:35:03 +02:00
errors.LetsEncrypt -> errors. (fixes: #487)
This commit is contained in:
+11
-11
@@ -96,7 +96,7 @@ class Client(object):
|
||||
self.account.regr = self.network.agree_to_tos(self.account.regr)
|
||||
else:
|
||||
# What is the proper response here...
|
||||
raise errors.LetsEncryptClientError("Must agree to TOS")
|
||||
raise errors.Error("Must agree to TOS")
|
||||
|
||||
self.account.save()
|
||||
self._report_new_account()
|
||||
@@ -145,9 +145,9 @@ class Client(object):
|
||||
msg = ("Unable to obtain certificate because authenticator is "
|
||||
"not set.")
|
||||
logging.warning(msg)
|
||||
raise errors.LetsEncryptClientError(msg)
|
||||
raise errors.Error(msg)
|
||||
if self.account.regr is None:
|
||||
raise errors.LetsEncryptClientError(
|
||||
raise errors.Error(
|
||||
"Please register with the ACME server first.")
|
||||
|
||||
# Perform Challenges/Get Authorizations
|
||||
@@ -310,7 +310,7 @@ class Client(object):
|
||||
if self.installer is None:
|
||||
logging.warning("No installer specified, client is unable to deploy"
|
||||
"the certificate")
|
||||
raise errors.LetsEncryptClientError("No installer available")
|
||||
raise errors.Error("No installer available")
|
||||
|
||||
chain_path = None if chain_path is None else os.path.abspath(chain_path)
|
||||
|
||||
@@ -339,14 +339,14 @@ class Client(object):
|
||||
:param redirect: If traffic should be forwarded from HTTP to HTTPS.
|
||||
:type redirect: bool or None
|
||||
|
||||
:raises letsencrypt.errors.LetsEncryptClientError: if
|
||||
:raises letsencrypt.errors.Error: if
|
||||
no installer is specified in the client.
|
||||
|
||||
"""
|
||||
if self.installer is None:
|
||||
logging.warning("No installer is specified, there isn't any "
|
||||
"configuration to enhance.")
|
||||
raise errors.LetsEncryptClientError("No installer available")
|
||||
raise errors.Error("No installer available")
|
||||
|
||||
if redirect is None:
|
||||
redirect = enhancements.ask("redirect")
|
||||
@@ -364,7 +364,7 @@ class Client(object):
|
||||
for dom in domains:
|
||||
try:
|
||||
self.installer.enhance(dom, "redirect")
|
||||
except errors.LetsEncryptConfiguratorError:
|
||||
except errors.ConfiguratorError:
|
||||
logging.warn("Unable to perform redirect for %s", dom)
|
||||
|
||||
self.installer.save("Add Redirects")
|
||||
@@ -386,7 +386,7 @@ def validate_key_csr(privkey, csr=None):
|
||||
:param csr: CSR
|
||||
:type csr: :class:`letsencrypt.le_util.CSR`
|
||||
|
||||
:raises letsencrypt.errors.LetsEncryptClientError: when
|
||||
:raises letsencrypt.errors.Error: when
|
||||
validation fails
|
||||
|
||||
"""
|
||||
@@ -396,7 +396,7 @@ def validate_key_csr(privkey, csr=None):
|
||||
|
||||
# Key must be readable and valid.
|
||||
if privkey.pem and not crypto_util.valid_privkey(privkey.pem):
|
||||
raise errors.LetsEncryptClientError(
|
||||
raise errors.Error(
|
||||
"The provided key is not a valid key")
|
||||
|
||||
if csr:
|
||||
@@ -406,7 +406,7 @@ def validate_key_csr(privkey, csr=None):
|
||||
|
||||
# If CSR is provided, it must be readable and valid.
|
||||
if csr.data and not crypto_util.valid_csr(csr.data):
|
||||
raise errors.LetsEncryptClientError(
|
||||
raise errors.Error(
|
||||
"The provided CSR is not a valid CSR")
|
||||
|
||||
# If both CSR and key are provided, the key must be the same key used
|
||||
@@ -414,7 +414,7 @@ def validate_key_csr(privkey, csr=None):
|
||||
if csr.data and privkey.pem:
|
||||
if not crypto_util.csr_matches_pubkey(
|
||||
csr.data, privkey.pem):
|
||||
raise errors.LetsEncryptClientError(
|
||||
raise errors.Error(
|
||||
"The key and CSR do not match")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user