Handle missing dnspython by displaying a warning message

This commit is contained in:
Mathieu Leduc-Hamel
2016-08-18 21:41:33 -04:00
parent 075e666300
commit 9958a7fc1c
4 changed files with 29 additions and 4 deletions
+9 -2
View File
@@ -15,6 +15,7 @@ import zope.interface
from functools import partial
from acme import challenges
from acme import errors as acme_errors
from certbot import errors
from certbot import interfaces
@@ -213,9 +214,15 @@ s.serve_forever()" """
response=response)
self._ip_logging_permission(formated_message)
if not response.simple_verify(
try:
verification_status = response.simple_verify(
achall.chall, achall.domain,
achall.account_key.public_key()):
achall.account_key.public_key())
except acme_errors.DependencyError:
verification_status = False
logger.warning("Dns challenge requires `dnspython`")
if not verification_status:
logger.warning("Self-verify of challenge failed.")
return response