mirror of https://github.com/python/cpython
bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848)
Strip trailing '\n'.
This commit is contained in:
parent
8e5de40f90
commit
59a633d3e2
|
@ -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:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix a regression in py_compile when reading filenames from standard input.
|
Loading…
Reference in New Issue