Setup.py and style fixes

This commit is contained in:
Wilfried Teiken 2016-01-06 00:27:07 -05:00
parent fd2709a6fa
commit 57c265c7f3
2 changed files with 4 additions and 3 deletions

View file

@ -713,11 +713,12 @@ def txt_records_for_name(name):
"""
try:
import dns.resolver
import dns.exception
dns_response = dns.resolver.query(name, 'TXT')
except ImportError as error:
raise ImportError("Local validation for 'dns-01' challenges requires "
"'dnspython'");
except Exception as error:
"'dnspython'")
except dns.exception.DNSException as error:
logger.error("Unable to resolve %s: %s", name, str(error))
return []
return [txt_rec for rdata in dns_response for txt_rec in rdata.strings]

View file

@ -75,7 +75,7 @@ setup(
install_requires=install_requires,
extras_require={
'docs': docs_extras,
'testing': testing_extras + 'dnspython',
'testing': testing_extras + ['dnspython'],
},
entry_points={
'console_scripts': [