From 36029a0343c1c4221b84b3b1ee0e7c841f75d1d6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 7 Apr 2011 07:34:47 +1000 Subject: samba_dnsupdate: Don't use subprocess.check_call, it isn't in python 2.4 RHEL5 and clones use python 2.5 --- source4/scripting/bin/samba_dnsupdate | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source4/scripting') 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: -- cgit