-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
It's possible for capture_both/run to fail here, and process is not defined in the exception handler.
dcos-e2e/src/dcos_e2e/_subprocess_tools.py
Lines 103 to 125 in 3e5eae8
| if pipe_output: | |
| process = sarge.capture_both(args, cwd=cwd, env=env, async_=True) | |
| while all( | |
| command.returncode is None for command in process.commands | |
| ): | |
| _read_output(process=process) | |
| process.poll_all() | |
| time.sleep(0.05) | |
| _read_output(process=process) | |
| else: | |
| process = sarge.run(args, cwd=cwd, env=env, async_=True) | |
| stdout_logger.flush() | |
| stderr_logger.flush() | |
| # stderr/stdout are not readable anymore which usually means | |
| # that the child process has exited. However, the child | |
| # process has not been wait()ed for yet, i.e. it has not yet | |
| # been reaped. That is, its exit status is unknown. Read its | |
| # exit status | |
| process.wait() | |
| except Exception: # pragma: no cover pylint: disable=broad-except | |
| for popen_process in process.processes: |
Metadata
Metadata
Assignees
Labels
No labels