summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/samba_dnsupdate
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-17 12:33:02 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-17 23:55:38 +1100
commit60449d561dd4fdbe5ea9368ea59ef4e8bfa7b420 (patch)
treefa20762da19707d43f106b4f6215e54946ac5110 /source4/scripting/bin/samba_dnsupdate
parentd1c1aaeb8b9ca662f57e74546c56c9213c7e3920 (diff)
downloadsamba-60449d561dd4fdbe5ea9368ea59ef4e8bfa7b420.tar.gz
samba-60449d561dd4fdbe5ea9368ea59ef4e8bfa7b420.tar.bz2
samba-60449d561dd4fdbe5ea9368ea59ef4e8bfa7b420.zip
s4-dns: catch more expections in samba_dnsupdate
Diffstat (limited to 'source4/scripting/bin/samba_dnsupdate')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 9911c6ae26..1b5bc3eb8a 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -259,11 +259,13 @@ def call_nsupdate(d):
try:
cmd = "%s %s" % (nsupdate_cmd, tmpfile)
subprocess.check_call(cmd, shell=True)
- except subprocess.CalledProcessError:
+ except Exception, estr:
global error_count
if opts.fail_immediately:
sys.exit(1)
error_count = error_count + 1
+ if opts.verbose:
+ print("Failed nsupdate: %s : %s" % (str(d), estr))
os.unlink(tmpfile)
@@ -403,4 +405,6 @@ for d in update_list:
if ccachename is not None:
os.unlink(ccachename)
+if error_count != 0:
+ print("Failed update of %u entries" % error_count)
sys.exit(error_count)