samba_dnsupdate: Raise after the error count is incremented
authorGarming Sam <garming@catalyst.net.nz>
Mon, 25 Jul 2016 23:34:05 +0000 (11:34 +1200)
committerGarming Sam <garming@samba.org>
Tue, 22 Nov 2016 04:59:40 +0000 (05:59 +0100)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Tue Nov 22 05:59:40 CET 2016 on sn-devel-144

source4/scripting/bin/samba_dnsupdate

index d18d8bd1f1903fc994fb9ce729f38e940b042449..1633561e17331360806eceef2f43acf40b57ecf1 100755 (executable)
@@ -562,12 +562,12 @@ def call_samba_tool(d, op="add", zone=None):
             if opts.verbose:
                 print("Failed 'samba-tool dns' based update: %s : %s" % (str(d), estr))
     except Exception, estr:
-        raise
         if opts.fail_immediately:
             sys.exit(1)
         error_count = error_count + 1
         if opts.verbose:
             print("Failed 'samba-tool dns' based update: %s : %s" % (str(d), estr))
+        raise
 
 def rodc_dns_update(d, t, op):
     '''a single DNS update via the RODC netlogon call'''