(executor, command, working_directory, all_env_variables)
| 21 | |
| 22 | |
| 23 | def create_process_wrapper(executor, command, working_directory, all_env_variables): |
| 24 | run_pty = executor.config.requires_terminal |
| 25 | if run_pty and not os_utils.is_pty_supported(): |
| 26 | LOGGER.warning( |
| 27 | "Requested PTY mode, but it's not supported for this OS (" + sys.platform + '). Falling back to POpen') |
| 28 | run_pty = False |
| 29 | |
| 30 | if run_pty: |
| 31 | from execution import process_pty |
| 32 | process_wrapper = process_pty.PtyProcessWrapper(command, working_directory, all_env_variables) |
| 33 | else: |
| 34 | process_wrapper = process_popen.POpenProcessWrapper(command, working_directory, all_env_variables) |
| 35 | |
| 36 | return process_wrapper |
| 37 | |
| 38 | |
| 39 | _process_creator = create_process_wrapper |
nothing calls this directly
no outgoing calls
no test coverage detected