diff --git a/conformance/update_failure_list.py b/conformance/update_failure_list.py index 63f453df1b..ad42ed3c18 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):