summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2012-01-09 13:21:49 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2012-01-10 00:41:59 +0100
commit354e43ca1e1a671a9a2a64e40d8fedc19b848ce6 (patch)
treed6c1e34c79816b0fa120a5464b9e5b7d89d6f153
parenta43b472b62be7d270f1dea0fc3557097f40fcee1 (diff)
downloadsamba-354e43ca1e1a671a9a2a64e40d8fedc19b848ce6.tar.gz
samba-354e43ca1e1a671a9a2a64e40d8fedc19b848ce6.tar.bz2
samba-354e43ca1e1a671a9a2a64e40d8fedc19b848ce6.zip
s4:python tests __init__.py - do not depend on "subprocess.check_call()"
Method not present in Python 2.4 Reviewed-by: Jelmer Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Tue Jan 10 00:41:59 CET 2012 on sn-devel-104
-rw-r--r--source4/scripting/python/samba/tests/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/tests/__init__.py b/source4/scripting/python/samba/tests/__init__.py
index d9fbb15a02..e2baa749b7 100644
--- a/source4/scripting/python/samba/tests/__init__.py
+++ b/source4/scripting/python/samba/tests/__init__.py
@@ -154,7 +154,10 @@ class BlackboxTestCase(TestCase):
def check_run(self, line):
line = self._make_cmdline(line)
- subprocess.check_call(line, shell=True)
+ p = subprocess.Popen(line, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
+ retcode = p.wait()
+ if retcode:
+ raise BlackboxProcessError(retcode, line, p.stdout.read(), p.stderr.read())
def check_output(self, line):
line = self._make_cmdline(line)