file() was removed in Python 3, use open() instead

http://python-future.org/compatible_idioms.html#file
pull/3516/head
cclauss 7 years ago committed by GitHub
parent 5ab8ae7566
commit 45483fd1c0
  1. 4
      conformance/update_failure_list.py

@ -35,7 +35,6 @@ This is sort of like comm(1), except it recognizes comments and ignores them.
"""
import argparse
import fileinput
parser = argparse.ArgumentParser(
description='Adds/removes failures from the failure list.')
@ -62,7 +61,8 @@ for remove_file in (args.remove_list or []):
add_list = sorted(add_set, reverse=True)
existing_list = file(args.filename).read()
with open(args.filename) as in_file:
existing_list = in_file.read()
with open(args.filename, "w") as f:
for line in existing_list.splitlines(True):

Loading…
Cancel
Save