Skip to content

Commit af69301

Browse files
committed
only if we got a Process object back
1 parent f69e124 commit af69301

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cwltest/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ def run_test(
206206
_logger.error(test.get("doc"))
207207
# Kill and re-communicate to get the logs and reap the child, as
208208
# instructed in the subprocess docs.
209-
process.kill()
210-
outstr, outerr = process.communicate()
209+
if process:
210+
process.kill()
211+
outstr, outerr = process.communicate()
211212
return TestResult(2, outstr, outerr, timeout, args.classname, "Test timed out")
212213
finally:
213214
if process is not None and process.returncode is None:

0 commit comments

Comments
 (0)