Skip to content

Commit 7e86b5c

Browse files
joelarmstrongmr-c
authored andcommitted
Fix a crash when --verbose was used (#71)
--verbose makes stderr get passed through rather than being piped to cwltest. But in that case Popen.communicate() will return None in place of the stderr data.
1 parent 4b02ff9 commit 7e86b5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cwltest/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def run_test(args, # type: argparse.Namespace
113113
start_time = time.time()
114114
stderr = subprocess.PIPE if not args.verbose else None
115115
process = subprocess.Popen(test_command, stdout=subprocess.PIPE, stderr=stderr)
116-
outstr, outerr = [var.decode('utf-8') for var in process.communicate(timeout=timeout)]
116+
outstr, outerr = [(var or b'').decode('utf-8') for var in process.communicate(timeout=timeout)]
117117
return_code = process.poll()
118118
duration = time.time() - start_time
119119
if return_code:

0 commit comments

Comments
 (0)