summaryrefslogtreecommitdiffstats
path: root/qa/tasks/vstart_runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'qa/tasks/vstart_runner.py')
-rw-r--r--qa/tasks/vstart_runner.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py
index ca929ba05b4..2ed21431330 100644
--- a/qa/tasks/vstart_runner.py
+++ b/qa/tasks/vstart_runner.py
@@ -233,6 +233,11 @@ class LocalRemoteProcess(object):
else:
self.stderr.write(err)
+ def _handle_subprocess_output(self, output, stream):
+ if isinstance(stream, StringIO):
+ return rm_nonascii_chars(output)
+ return output
+
def wait(self, timeout=None):
# Null subproc.stdin so communicate() does not try flushing/closing it
# again.
@@ -250,7 +255,8 @@ class LocalRemoteProcess(object):
return
out, err = self.subproc.communicate(timeout=timeout)
- out, err = rm_nonascii_chars(out), rm_nonascii_chars(err)
+ out = self._handle_subprocess_output(out, self.stdout)
+ err = self._handle_subprocess_output(err, self.stderr)
self._write_stdout(out)
self._write_stderr(err)