Communicates with the job sending any input data to stdin and collecting stdout and stderr. :param input: Data to send to stdin of the job as per the `subprocess` API. :return: A tuple of the job's stdout and stderr as per the `subprocess` API. :raises: :class:`Job.E
(self, input=None)
| 119 | self._finalize_job() |
| 120 | |
| 121 | def communicate(self, input=None): |
| 122 | # type: (Optional[bytes]) -> Tuple[bytes, bytes] |
| 123 | """Communicates with the job sending any input data to stdin and collecting stdout and |
| 124 | stderr. |
| 125 | |
| 126 | :param input: Data to send to stdin of the job as per the `subprocess` API. |
| 127 | :return: A tuple of the job's stdout and stderr as per the `subprocess` API. |
| 128 | :raises: :class:`Job.Error` if the job exited non-zero. |
| 129 | """ |
| 130 | try: |
| 131 | stdout, stderr = self._process.communicate(input=input) |
| 132 | self._check_returncode(stderr) |
| 133 | return stdout, stderr |
| 134 | finally: |
| 135 | self._finalize_job() |
| 136 | |
| 137 | def kill(self): |
| 138 | # type: () -> None |