Fixed output processing for pip processes

This commit is contained in:
Gina Häußge committed 2016-02-11 09:55:44 +01:00
1 parent b2391322d4
commit f07e3d9f2d
2 files changed
+6 -7

No files matched your search

+5 -6
View File
@@ -86,13 +86,13 @@ class CommandlineCaller(object):
while p.returncode is None:
line = p.stderr.readline(timeout=0.5)
if line:
line = self._preprocess_lines(line)
line, = self._preprocess_lines(line)
self._log_stderr(line)
all_stderr.append(line)
line = p.stdout.readline(timeout=0.5)
if line:
line = self._preprocess_lines(line)
line, = self._preprocess_lines(line)
self._log_stdout(line)
all_stdout.append(line)
@@ -103,14 +103,13 @@ class CommandlineCaller(object):
stderr = p.stderr.text
if stderr:
split_lines = self._preprocess_lines(
stderr.split("\n"))
split_lines = self._preprocess_lines(*stderr.split("\n"))
self._log_stderr(*split_lines)
all_stderr += split_lines
stdout = p.stdout.text
if stdout:
split_lines = self._preprocess_lines(stdout.split("\n"))
split_lines = self._preprocess_lines(*stdout.split("\n"))
self._log_stdout(*split_lines)
all_stdout += split_lines
@@ -122,5 +121,5 @@ class CommandlineCaller(object):
def _log_stderr(self, *lines):
self.on_log_stderr(*lines)
def _preprocess_lines(self, lines):
def _preprocess_lines(self, *lines):
return lines
+1 -1
View File
@@ -367,7 +367,7 @@ class PipCaller(CommandlineCaller):
self._logger.debug("Could not detect desired output from testballoon install, got this instead: {!r}".format(data))
return False, False, False, None
def _preprocess_lines(self, lines):
def _preprocess_lines(self, *lines):
return map(self._preprocess, lines)
@staticmethod