breaks on non-ascii characters in verify_command output on failure
Bug #750930 reported by
Jelmer Vernooij
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Tarmac |
Fix Released
|
High
|
John A Meinel |
Bug Description
If the verify command fails and its output contains non-ascii characters, tarmac will crash with a UnicodeDecodeError.
I've worked around this with the attached patch, but my assumption that the command's output will always be utf8 is probably not always correct.
Related branches
lp:~jameinel/tarmac/non_ascii-750930
- dobey: Disapprove
- Paul Hummer: Pending requested
-
Diff: 37 lines (+19/-0)2 files modifiedtarmac/plugins/command.py (+2/-0)
tarmac/plugins/tests/test_command.py (+17/-0)
lp:~dobey/tarmac/non_ascii-750930
- Mike McCracken: Approve
-
Diff: 44 lines (+26/-0)2 files modifiedtarmac/plugins/command.py (+2/-0)
tarmac/plugins/tests/test_command.py (+24/-0)
description: | updated |
Changed in tarmac: | |
status: | New → Confirmed |
Changed in tarmac: | |
assignee: | nobody → John A Meinel (jameinel) |
importance: | Undecided → High |
status: | Confirmed → In Progress |
Changed in tarmac: | |
status: | In Progress → Fix Committed |
Changed in tarmac: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I did it slightly differently, but I think the same idea applies. I think assuming UTF-8 is the "most reasonable" thing to do as a starting place.
I ran into this because apparently GCC now emits non-ascii characters. The line I think was failing is: pf_6meliae_ 7_loader_ 17_MOCValueIter ator___ next__’ :
meliae/_loader.c: In function ‘__pyx_
You can see the 'fixed' failure: /code.launchpad .net/~jameinel/ meliae/ bad_test/ +merge/ 73807
https:/
Without that, Tarmac just dies trying to run.
Arguably, at a minimum, Tarmac should be safe against command failures, such that it at least gives feedback that "I failed to merge this because of XYZ".