Nir Soffer has uploaded a new change for review.
Change subject: procwatch: Specify stdout and stderr explicitly
......................................................................
procwatch: Specify stdout and stderr explicitly
Unlike subprocess.Popen, cpopen.CPopen is always creating a pipe for
stdin, stdout and stderr. Specifying stdout and stderr allows replacing
cpopen.CPopen with subprocess.Popen, required for python 3 support.
Change-Id: I4a88d14f02763290116b167f83462edb28235ad2
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M tests/procwatch_test.py
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/78/65078/1
diff --git a/tests/procwatch_test.py b/tests/procwatch_test.py
index 1995727..53f2548 100644
--- a/tests/procwatch_test.py
+++ b/tests/procwatch_test.py
@@ -21,6 +21,7 @@
from __future__ import absolute_import
import operator
import signal
+import subprocess
from testlib import VdsmTestCase
from testlib import expandPermutations, permutations
@@ -129,4 +130,5 @@
raise AssertionError("Unexpected data: %r" % data)
def start_process(self, cmd):
- return compat.CPopen(cmd)
+ return compat.CPopen(cmd, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
--
To view, visit
https://gerrit.ovirt.org/65078
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a88d14f02763290116b167f83462edb28235ad2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>