Implement wait timeout support for Python 3.
(popen: subprocess.Popen[Any], timeout: Optional[float])
| 32 | |
| 33 | |
| 34 | def _popen_wait(popen: subprocess.Popen[Any], timeout: Optional[float]) -> Optional[int]: |
| 35 | """Implement wait timeout support for Python 3.""" |
| 36 | try: |
| 37 | return popen.wait(timeout=timeout) |
| 38 | except subprocess.TimeoutExpired: |
| 39 | # Silence TimeoutExpired errors. |
| 40 | return None |
| 41 | |
| 42 | |
| 43 | def _silence_resource_warning(popen: Optional[subprocess.Popen[Any]]) -> None: |
no test coverage detected