aboutsummaryrefslogtreecommitdiffhomepage
path: root/conformance
diff options
context:
space:
mode:
authorGravatar cclauss <cclauss@bluewin.ch>2017-08-18 01:04:17 +0200
committerGravatar GitHub <noreply@github.com>2017-08-18 01:04:17 +0200
commit45483fd1c0dcb3760186430b7af65a672ac7b024 (patch)
treed7fa68c96f2c364c9a1fd86fc4cfd647fed9da95 /conformance
parent5ab8ae75668d38db44e8d23437170f8f108a7581 (diff)
file() was removed in Python 3, use open() instead
Diffstat (limited to 'conformance')
-rwxr-xr-xconformance/update_failure_list.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/conformance/update_failure_list.py b/conformance/update_failure_list.py
index 63f453df..ad42ed3c 100755
--- a/conformance/update_failure_list.py
+++ b/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):