forked from OSchip/llvm-project
[opt-viewer] Python 3 support in opt-diff.py
Summary: The `file()` builtin is not available in Python 3; use `open()` instead. https://docs.python.org/3.0/whatsnew/3.0.html#builtins Reviewers: anemet, davidxl, davide Reviewed By: davide Subscribers: davide, fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D34670 llvm-svn: 306423
This commit is contained in:
parent
22322fb638
commit
9473db43b6
|
@ -66,5 +66,5 @@ if __name__ == '__main__':
|
|||
r.Added = True
|
||||
for r in removed:
|
||||
r.Added = False
|
||||
stream = file(args.output, 'w')
|
||||
yaml.dump_all(added | removed, stream)
|
||||
with open(args.output, 'w') as stream:
|
||||
yaml.dump_all(added | removed, stream)
|
||||
|
|
Loading…
Reference in New Issue