From 480dbd358c12f0d4b3760d6a9002026fbd52a366 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 14 Jul 2014 21:48:10 +0200 Subject: [PATCH] update_ns: catch UnknownTSIGKey exception --- nsupdate/main/dnstools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nsupdate/main/dnstools.py b/nsupdate/main/dnstools.py index 7f036a8..f253477 100644 --- a/nsupdate/main/dnstools.py +++ b/nsupdate/main/dnstools.py @@ -315,6 +315,10 @@ def update_ns(fqdn, rdtype='A', ipaddr=None, origin=None, action='upd', ttl=60): logger.error("PeerBadSignature - shared secret mismatch? zone: %s" % (origin, )) set_ns_availability(domain, False) raise DnsUpdateError("PeerBadSignature") + except dns.message.UnknownTSIGKey as e: + logger.error("UnknownTSIGKey [%s] - zone: %s" % (str(e), origin, )) + set_ns_availability(domain, False) + raise DnsUpdateError("UnknownTSIGKey") def set_ns_availability(domain, available):