Commit c730d77c authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Fix a bug in helper-monitor.py

Some self. prefixes were missing when calling some variables from the
HelperMonitor class.
parent aea26aab
......@@ -103,10 +103,10 @@ class HelperMonitor(object):
MAXLINES)
if self.lines_left > 0:
self.stderr += "%s\n" % line
self.stderr += "%s\n" % self.line
self.lines_left -= 1
if self.lines_left == 0:
self.send("STDERR", stderr)
self.send("STDERR", self.stderr)
self.stderr = ""
self.line = ""
continue
......@@ -116,7 +116,7 @@ class HelperMonitor(object):
continue
if self.line.startswith("STDERR:"):
m = re.match("STDERR:(\d+):(.*)", line)
m = re.match("STDERR:(\d+):(.*)", self.line)
if not m:
error("Invalid syntax for STDERR line")
try:
......@@ -127,14 +127,14 @@ class HelperMonitor(object):
if self.lines_left > STDERR_MAXLINES:
error("Too many lines in the STDERR output")
elif self.lines_left < 0:
error("Second field of STDERR: %d is invalid" % lines_left)
error("Second field of STDERR: %d is invalid" % self.lines_left)
if self.lines_left > 0:
self.stderr = m.group(2) + "\n"
self.lines_left -= 1
if self.lines_left == 0:
self.send("STDERR", stderr)
self.send("STDERR", self.stderr)
self.stderr = ""
elif self.line.startswith("TASK_START:") \
or self.line.startswith("TASK_END:") \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment