Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
45483fd1
Commit
45483fd1
authored
Aug 17, 2017
by
cclauss
Committed by
GitHub
Aug 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
file() was removed in Python 3, use open() instead
http://python-future.org/compatible_idioms.html#file
parent
5ab8ae75
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
update_failure_list.py
conformance/update_failure_list.py
+2
-2
No files found.
conformance/update_failure_list.py
View file @
45483fd1
...
@@ -35,7 +35,6 @@ This is sort of like comm(1), except it recognizes comments and ignores them.
...
@@ -35,7 +35,6 @@ This is sort of like comm(1), except it recognizes comments and ignores them.
"""
"""
import
argparse
import
argparse
import
fileinput
parser
=
argparse
.
ArgumentParser
(
parser
=
argparse
.
ArgumentParser
(
description
=
'Adds/removes failures from the failure list.'
)
description
=
'Adds/removes failures from the failure list.'
)
...
@@ -62,7 +61,8 @@ for remove_file in (args.remove_list or []):
...
@@ -62,7 +61,8 @@ for remove_file in (args.remove_list or []):
add_list
=
sorted
(
add_set
,
reverse
=
True
)
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
:
with
open
(
args
.
filename
,
"w"
)
as
f
:
for
line
in
existing_list
.
splitlines
(
True
):
for
line
in
existing_list
.
splitlines
(
True
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment