From 20951385300fe19ccc16e24c816779cceb4a70c9 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 19 Sep 2016 17:35:17 +0300 Subject: Make error report not crash if non-ascii --- yarn | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/yarn b/yarn index 046c45d..b585864 100755 --- a/yarn +++ b/yarn @@ -496,13 +496,13 @@ class YarnRunner(cliapp.Application): logging.debug('Standard error: empty') if exit != 0 and report_error: - self.error( - 'ERROR: In scenario "%s"\nstep "%s %s" failed,\n' - 'with exit code %d:\n' - 'Standard output from shell command:\n%s' - 'Standard error from shell command:\n%s' % - (scenario.name, step.what, step.text, exit, - self.indent(stdout), self.indent(stderr))) + self.error('ERROR: In scenario "%s"\n' % step.what) + self.error('step "%s %s" failed,\n' % (step.what, step.text)) + self.error('with exit code %d:\n' % exit) + self.error('Standard output from shell command:\n%s' % + self.indent(stdout)) + self.error('Standard error from shell command:\n%s' % + self.indent(stderr)) self.remember_step_timing( '%s %s' % (step.what, step.text), time.time() - started) -- cgit v1.2.1