mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 00:00:44 +02:00
LetsEncryptClientError
This commit is contained in:
@@ -16,6 +16,7 @@ from letsencrypt.client import apache_configurator
|
||||
from letsencrypt.client import CONFIG
|
||||
from letsencrypt.client import crypto_util
|
||||
from letsencrypt.client import display
|
||||
from letsencrypt.client import errors
|
||||
from letsencrypt.client import le_util
|
||||
from letsencrypt.client import logger
|
||||
|
||||
@@ -328,7 +329,7 @@ class Client(object):
|
||||
(msg_dict["error"],
|
||||
msg_dict.get("message", ""),
|
||||
msg_dict.get("moreInfo", "")))
|
||||
raise Exception(msg_dict["error"])
|
||||
raise errors.LetsEncryptClientError(msg_dict["error"])
|
||||
|
||||
elif msg_dict["type"] == "defer":
|
||||
logger.info("Waiting for %d seconds..." % delay)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
"""Let's Encrypt client errors."""
|
||||
|
||||
|
||||
class LetsEncryptClientError(Exception):
|
||||
"""Generic Let's Encrypt client error."""
|
||||
@@ -5,6 +5,7 @@ import time
|
||||
import dialog
|
||||
|
||||
from letsencrypt.client import display
|
||||
from letsencrypt.client import errors
|
||||
|
||||
|
||||
class Singleton(object):
|
||||
@@ -35,7 +36,7 @@ class Logger(Singleton):
|
||||
return self.debugLevelStr[level]
|
||||
|
||||
def log(self, level, data):
|
||||
raise Exception("Error: no Logger defined")
|
||||
raise errors.LetsEncryptClientError("No Logger defined")
|
||||
|
||||
def timefmt(self, t=None):
|
||||
if t == None:
|
||||
|
||||
Reference in New Issue
Block a user