=== modified file 'lava_dispatcher/context.py'
@@ -126,6 +126,11 @@
proc.logfile_read = self.logfile_read
return proc
+ def log(self, msg):
+ self.logfile_read.write(msg)
+ if not msg.endswith('\n'):
+ self.logfile_read.write('\n')
+
def run_command(self, command, failok=True):
"""run command 'command' with output going to output-dir if specified"""
if isinstance(command, (str, unicode)):
=== modified file 'lava_dispatcher/job.py'
@@ -324,8 +324,8 @@
err_msg += "Lava failed on test: %s" % \
params.get('test_name', "Unknown")
err_msg = err_msg + traceback.format_exc()
- print("ErrorMessage: %s" % unicode(str(err)))
- print err_msg
+ self.context.log("ErrorMessage: %s" % unicode(str(err)))
+ self.context.log(err_msg)
else:
logging.info(
"[ACTION-E] %s is finished successfully." %