Skip to content

Commit

Permalink
bpo-45428: Fix reading filenames from stdin in py_compile (pythonGH-2…
Browse files Browse the repository at this point in the history
…8848)

Strip trailing '\n'.
  • Loading branch information
ginggs authored Oct 15, 2021
1 parent 8e5de40 commit 59a633d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/py_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def main():
)
args = parser.parse_args()
if args.filenames == ['-']:
filenames = sys.stdin.readlines()
filenames = [filename.rstrip('\n') for filename in sys.stdin.readlines()]
else:
filenames = args.filenames
for filename in filenames:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a regression in py_compile when reading filenames from standard input.

0 comments on commit 59a633d

Please sign in to comment.