Skip to content

Commit

Permalink
file() was removed in Python 3, use open() instead
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Aug 17, 2017
1 parent 5ab8ae7 commit 45483fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conformance/update_failure_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"""

import argparse
import fileinput

parser = argparse.ArgumentParser(
description='Adds/removes failures from the failure list.')
Expand All @@ -62,7 +61,8 @@

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):
Expand Down

0 comments on commit 45483fd

Please sign in to comment.