From 1dfc9b6af7edea011be91df133eb6b209c268516 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Mon, 20 Mar 2023 14:18:54 -0700 Subject: [PATCH] Fixed a bug in handling arguments from stdin/file 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 --- launchable/test_runners/launchable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launchable/test_runners/launchable.py b/launchable/test_runners/launchable.py index 1913aab2e..f7404f17c 100644 --- a/launchable/test_runners/launchable.py +++ b/launchable/test_runners/launchable.py @@ -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)