summaryrefslogtreecommitdiff
path: root/source4/scripting/bin
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-07 07:34:47 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-04-07 14:35:36 +1000
commit36029a0343c1c4221b84b3b1ee0e7c841f75d1d6 (patch)
tree37d29a9da912f54269e6ef1de05a91050ce39216 /source4/scripting/bin
parent77820d59fe517168db5cb79b05214ae9fd6b4467 (diff)
downloadsamba-36029a0343c1c4221b84b3b1ee0e7c841f75d1d6.tar.gz
samba-36029a0343c1c4221b84b3b1ee0e7c841f75d1d6.tar.bz2
samba-36029a0343c1c4221b84b3b1ee0e7c841f75d1d6.zip
samba_dnsupdate: Don't use subprocess.check_call, it isn't in python 2.4
RHEL5 and clones use python 2.5
Diffstat (limited to 'source4/scripting/bin')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 99f898e204..695bed6e80 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -263,7 +263,14 @@ def call_nsupdate(d):
try:
cmd = nsupdate_cmd[:]
cmd.append(tmpfile)
- subprocess.check_call(cmd, shell=False)
+ ret = subprocess.call(cmd, shell=False)
+ if ret != 0:
+ global error_count
+ if opts.fail_immediately:
+ sys.exit(1)
+ error_count = error_count + 1
+ if opts.verbose:
+ print("Failed nsupdate: %d" % ret)
except Exception, estr:
global error_count
if opts.fail_immediately: