Bug 1236111 - part 0: improve logging from process mixin, r=gps

This commit is contained in:
Gijs Kruitbosch 2016-01-05 11:13:05 +00:00
parent 71069f6ceb
commit 14c17987f8

View File

@ -75,7 +75,7 @@ class ProcessExecutionMixin(LoggingMixin):
"""
args = self._normalize_command(args, require_unix_environment)
self.log(logging.INFO, 'new_process', {'args': args}, ' '.join(args))
self.log(logging.INFO, 'new_process', {'args': ' '.join(args)}, '{args}')
def handleLine(line):
# Converts str to unicode on Python 2 and bytes to str on Python 3.
@ -144,7 +144,7 @@ class ProcessExecutionMixin(LoggingMixin):
ensure_exit_code = 0
if status != ensure_exit_code:
raise Exception('Process executed with non-0 exit code: %s' % args)
raise Exception('Process executed with non-0 exit code %d: %s' % (status, args))
return status