Limit length of try block.

This commit is contained in:
Wilfried Teiken
2016-01-09 14:58:19 -05:00
parent 02a493011e
commit 446994e8ef
+1 -2
View File
@@ -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 "