mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 02:44:21 +02:00
Add errors.FailedChallenges and update AuthHandler to use it.
This commit is contained in:
@@ -14,6 +14,24 @@ class AuthorizationError(LetsEncryptClientError):
|
||||
"""Authorization error."""
|
||||
|
||||
|
||||
class FailedChallenges(AuthorizationError):
|
||||
"""Failed challenges error.
|
||||
|
||||
:ivar set failed_achalls: Failed `.AnnotatedChallenge` instances.
|
||||
|
||||
"""
|
||||
def __init__(self, failed_achalls):
|
||||
assert failed_achalls
|
||||
self.failed_achalls = failed_achalls
|
||||
super(FailedChallenges, self).__init__()
|
||||
|
||||
def __str__(self):
|
||||
return "Failed authorization procedure. {0}".format(
|
||||
", ".join(
|
||||
"{0} ({1}): {2}".format(achall.domain, achall.typ, achall.error)
|
||||
for achall in self.failed_achalls if achall.error is not None))
|
||||
|
||||
|
||||
class LetsEncryptContAuthError(AuthorizationError):
|
||||
"""Let's Encrypt Continuity Authenticator error."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user