Force utf8 encoding on subunit attachments output
On certain environments if the locale is set to ASCII when printing an attachment things will explode because it's potentially trying to use unicode chars outside of ASCII. This commit forces the attachment output to be unicode encoded to avoid this issue. Change-Id: I79ff7482ec3b1fd3ce83b8acf3137119b3db39a9 Closes-Bug: #1501415
This commit is contained in:
parent
d577844b7b
commit
65e1e1867c
@ -120,6 +120,7 @@ def print_attachments(stream, test, all_channels=False):
|
||||
# indent attachment lines 4 spaces to make them visually
|
||||
# offset
|
||||
for line in detail.as_text().split('\n'):
|
||||
line = line.encode('utf8')
|
||||
stream.write(" %s\n" % line)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user