Index: utils/opt-viewer/opt-diff.py =================================================================== --- utils/opt-viewer/opt-diff.py +++ utils/opt-viewer/opt-diff.py @@ -66,5 +66,5 @@ 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)