catch socket.error (e.g. "connection refused"), fixes #195
This commit is contained in:
parent
795170e2b9
commit
0d8f6cc82e
@ -325,6 +325,10 @@ def update_ns(fqdn, rdtype='A', ipaddr=None, action='upd', ttl=60):
|
||||
rcode_text, action, name, origin, rdtype, ipaddr))
|
||||
raise DnsUpdateError(rcode_text)
|
||||
return response
|
||||
except socket.error as e:
|
||||
logger.error("socket.error [%s] - zone: %s" % (str(e), origin, ))
|
||||
set_ns_availability(domain, False)
|
||||
raise DnsUpdateError("SocketError %d" % e.errno)
|
||||
except dns.exception.Timeout:
|
||||
logger.warning("timeout when performing %s for name %s and origin %s with rdtype %s and ipaddr %s" % (
|
||||
action, name, origin, rdtype, ipaddr))
|
||||
|
Loading…
x
Reference in New Issue
Block a user