Skip to content

Commit

Permalink
Fixed a bug in handling arguments from stdin/file
Browse files Browse the repository at this point in the history
reading file object as a generator returns NL at the end of each line.

See: https://docs.python.org/3/tutorial/inputoutput.html#methods-of-file-objects
  • Loading branch information
kohsuke committed Mar 20, 2023
1 parent 961484b commit 1dfc9b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions launchable/test_runners/launchable.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ def parse(fname: str):
elif fname == '@-':
# read stdin
for l in sys.stdin:
parse(l)
parse(l.rstrip())
elif fname.startswith('@'):
# read response file
with open(fname[1:]) as f:
for l in f:
parse(l)
parse(l.rstrip())
else:
# assume it's a file
client.test_path(fname)
Expand Down

0 comments on commit 1dfc9b6

Please sign in to comment.