mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
Limit length of try block.
This commit is contained in:
@@ -243,11 +243,10 @@ class DNS01Response(KeyAuthorizationChallengeResponse):
|
||||
|
||||
try:
|
||||
from acme import dns_resolver
|
||||
txt_records = dns_resolver.txt_records_for_name(
|
||||
validation_domain_name)
|
||||
except ImportError: # pragma: no cover
|
||||
raise errors.Error("Local validation for 'dns-01' challenges "
|
||||
"requires 'dnspython'")
|
||||
txt_records = dns_resolver.txt_records_for_name(validation_domain_name)
|
||||
exists = validation in txt_records
|
||||
if not exists:
|
||||
logger.debug("Key authorization from response (%r) doesn't match "
|
||||
|
||||
Reference in New Issue
Block a user