From b818ea9df9bd5769dc281bdd2892d10afb733cff Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Mon, 28 Apr 2014 00:47:28 +0200 Subject: [PATCH] catch / handle DnsUpdateError (e.g. SERVFAIL) --- nsupdate/main/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nsupdate/main/views.py b/nsupdate/main/views.py index 6c8cd78..30b71b3 100644 --- a/nsupdate/main/views.py +++ b/nsupdate/main/views.py @@ -198,6 +198,8 @@ class OverviewView(CreateView): success, level, msg = False, messages.ERROR, 'Timeout - communicating to name server failed.' except dnstools.NameServerNotAvailable: success, level, msg = False, messages.ERROR, 'Name server unavailable.' + except dnstools.DnsUpdateError as e: + success, level, msg = False, messages.ERROR, 'DNS update error [%s].' % str(e) except Domain.DoesNotExist: # should not happen: POST data had invalid (base)domain success, level, msg = False, messages.ERROR, 'Base domain does not exist.'