Skip to content

Commit 3282341

Browse files
author
Thomas Preud'homme
committed
[LNT] Python 3 support: encode LNT report format in UTF-8
Summary: Change encoding of LNT report format to be a UTF-8 JSON file since that is the only encoding the json module can produce in Python 3. While this is an incompatible change of the output, the existing import of LNT report format already expects UTF-8 JSON. Therefore this fixes an import issue for format produced from there and does not change anything for already produced format which could not be imported and still cannot be imported. Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls Reviewed By: hubert.reinterpretcast Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D68225 llvm-svn: 373218
1 parent d7ae3db commit 3282341

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lnt/testing/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ def render(self, indent=4):
9393
'machine': self.machine.render(),
9494
'run': self.run.render(),
9595
'tests': [t.render() for t in self.tests]},
96-
sort_keys=True, indent=indent, encoding='latin-1')
96+
sort_keys=True, indent=indent)
9797
else:
9898
return json.dumps({'Machine': self.machine.render(),
9999
'Run': self.run.render(),
100100
'Tests': [t.render() for t in self.tests]},
101-
sort_keys=True, indent=indent, encoding='latin-1')
101+
sort_keys=True, indent=indent)
102102

103103

104104
class Machine:

0 commit comments

Comments
 (0)