git.samba.org
/
rusty
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77820d5
)
samba_dnsupdate: Don't use subprocess.check_call, it isn't in python 2.4
author
Andrew Bartlett
<abartlet@samba.org>
Wed, 6 Apr 2011 21:34:47 +0000
(07:34 +1000)
committer
Andrew Bartlett
<abartlet@samba.org>
Thu, 7 Apr 2011 04:35:36 +0000
(14:35 +1000)
RHEL5 and clones use python 2.5
source4/scripting/bin/samba_dnsupdate
patch
|
blob
|
history
diff --git
a/source4/scripting/bin/samba_dnsupdate
b/source4/scripting/bin/samba_dnsupdate
index 99f898e2044d52dbed4dcaecffd87d41f5f7690a..695bed6e80fb715cb2e67c4d830b3d52a21f6562 100755
(executable)
--- 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: