Add a warning log if dnspython is not found for SRV lookup.

Closes issue #183
This commit is contained in:
Lance Stout 2012-07-16 19:38:50 -07:00
parent e8a3e92ceb
commit 51fee28bf4

View file

@ -254,6 +254,7 @@ def get_SRV(host, port, service, proto='tcp', resolver=None):
by SRV priorities and weights.
"""
if resolver is None:
log.warning("DNS: dnspython not found. Can not use SRV lookup.")
return [(host, port)]
log.debug("DNS: Querying SRV records for %s" % host)