|
1 | | -# Copyright 2018 - 2020 Alexey Stepanov aka penguinolog. |
| 1 | +# Copyright 2018 - 2021 Alexey Stepanov aka penguinolog. |
2 | 2 |
|
3 | 3 | # Copyright 2016 Mirantis, Inc. |
4 | 4 | # |
@@ -66,7 +66,7 @@ class SubprocessExecuteAsyncResult(api.ExecuteAsyncResult): |
66 | 66 | __slots__ = () |
67 | 67 |
|
68 | 68 | @property |
69 | | - def interface(self) -> subprocess.Popen[bytes]: # pylint: disable=unsubscriptable-object |
| 69 | + def interface(self) -> subprocess.Popen[bytes]: |
70 | 70 | """Override original NamedTuple with proper typing. |
71 | 71 |
|
72 | 72 | :return: control interface |
@@ -198,9 +198,9 @@ def close_streams() -> None: |
198 | 198 | result = exec_result.ExecResult(cmd=cmd_for_log, stdin=stdin, started=async_result.started) |
199 | 199 |
|
200 | 200 | # noinspection PyNoneFunctionAssignment,PyTypeChecker |
201 | | - stdout_future: concurrent.futures.Future[None] = poll_stdout() # pylint: disable=unsubscriptable-object |
| 201 | + stdout_future: concurrent.futures.Future[None] = poll_stdout() |
202 | 202 | # noinspection PyNoneFunctionAssignment,PyTypeChecker |
203 | | - stderr_future: concurrent.futures.Future[None] = poll_stderr() # pylint: disable=unsubscriptable-object |
| 203 | + stderr_future: concurrent.futures.Future[None] = poll_stderr() |
204 | 204 |
|
205 | 205 | try: |
206 | 206 | exit_code: int = async_result.interface.wait(timeout=timeout) # Wait real timeout here |
@@ -289,7 +289,7 @@ def _execute_async( # pylint: disable=arguments-differ |
289 | 289 | env = dict(copy.deepcopy(os.environ) if env is None else copy.deepcopy(env)) # type: ignore |
290 | 290 | env.update(env_patch) # type: ignore |
291 | 291 |
|
292 | | - process: subprocess.Popen[bytes] = subprocess.Popen( # pylint: disable=unsubscriptable-object |
| 292 | + process: subprocess.Popen[bytes] = subprocess.Popen( |
293 | 293 | args=[self._prepare_command(cmd=command, chroot_path=chroot_path)], |
294 | 294 | stdout=subprocess.PIPE if open_stdout else subprocess.DEVNULL, |
295 | 295 | stderr=subprocess.PIPE if open_stderr else subprocess.DEVNULL, |
|
0 commit comments