Merge lp:~gmb/tarmac/handle-unicode-test-output-properly into lp:tarmac

Proposed by Graham Binns
Status: Rejected
Rejected by: dobey
Proposed branch: lp:~gmb/tarmac/handle-unicode-test-output-properly
Merge into: lp:tarmac
Diff against target: 13 lines (+3/-1)
1 file modified
tarmac/plugins/command.py (+3/-1)
To merge this branch: bzr merge lp:~gmb/tarmac/handle-unicode-test-output-properly
Reviewer Review Type Date Requested Status
dobey Disapprove
John A Meinel Approve
Review via email: mp+162896@code.launchpad.net

Commit message

Command.do_failed() now handles unicode output from commands sanely.

Description of the change

This branch fixes Command.do_failed()'s handling of unicode in stderr and stdout. Previously, there was no such handling; do_failed() would blow up with a UnicodeDecodeError when it encountered a character it couldn't handle. Now the output is decode()d as UTF-8.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

It seems like there is a missing test here, but IIRC I've run into this as well (gcc seems to produce non ASCII text sometimes).

review: Approve
Revision history for this message
dobey (dobey) wrote :

A combination of this and https://code.launchpad.net/~jameinel/tarmac/non_ascii-750930/+merge/73831 seems like it would be best.

Paul probably is not going to ever review any branches though, so that branch needs to be re-submitted afresh, without Paul as a reviewer.

I'm sorry some of these branches have been sitting here for so long. I've just now noticed them, and Paul is no longer doing anything with Tarmac, so I'll be taking things over and trying to get through all these branches as soon as I can.

review: Needs Fixing
Revision history for this message
dobey (dobey) :
review: Disapprove

Unmerged revisions

407. By Graham Binns

Fixed the handling of unicode output from verify commands.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tarmac/plugins/command.py'
2--- tarmac/plugins/command.py 2011-09-02 04:06:25 +0000
3+++ tarmac/plugins/command.py 2013-05-07 23:27:25 +0000
4@@ -184,7 +184,9 @@
5 u'%(output)s') % {
6 'source': self.proposal.source_branch.display_name,
7 'target': self.proposal.target_branch.display_name,
8- 'output': u'\n'.join([stdout_value, stderr_value]),
9+ 'output': u'\n'.join([
10+ stdout_value.decode('UTF-8', 'ignore'),
11+ stderr_value.decode('UTF-8', 'ignore')]),
12 }
13 raise VerifyCommandFailed(message, comment)
14

Subscribers

People subscribed via source and target branches