diff options
| author | Nikita Slyusarev <[email protected]> | 2022-02-10 16:46:53 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:53 +0300 | 
| commit | 469afdc4e2587bf62ecdd096b75a0baa444c4012 (patch) | |
| tree | 49e222ea1c5804306084bb3ae065bb702625360f /contrib/python/ipython/py2/IPython/utils/_process_common.py | |
| parent | cd77cecfc03a3eaf87816af28a33067c4f0cdb59 (diff) | |
Restoring authorship annotation for Nikita Slyusarev <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/ipython/py2/IPython/utils/_process_common.py')
| -rw-r--r-- | contrib/python/ipython/py2/IPython/utils/_process_common.py | 18 | 
1 files changed, 9 insertions, 9 deletions
| diff --git a/contrib/python/ipython/py2/IPython/utils/_process_common.py b/contrib/python/ipython/py2/IPython/utils/_process_common.py index e1b305f7349..9ede30d3f8a 100644 --- a/contrib/python/ipython/py2/IPython/utils/_process_common.py +++ b/contrib/python/ipython/py2/IPython/utils/_process_common.py @@ -17,7 +17,7 @@ of subprocess utilities, and it contains tools that are common to all of them.  import subprocess  import shlex  import sys -import os  +import os  from IPython.utils import py3compat @@ -70,14 +70,14 @@ def process_handler(cmd, callback, stderr=subprocess.PIPE):      sys.stderr.flush()      # On win32, close_fds can't be true when using pipes for stdin/out/err      close_fds = sys.platform != 'win32' -    # Determine if cmd should be run with system shell.  -    shell = isinstance(cmd, py3compat.string_types)  -    # On POSIX systems run shell commands with user-preferred shell.  -    executable = None  -    if shell and os.name == 'posix' and 'SHELL' in os.environ:  -        executable = os.environ['SHELL']  -    p = subprocess.Popen(cmd, shell=shell,  -                         executable=executable,  +    # Determine if cmd should be run with system shell. +    shell = isinstance(cmd, py3compat.string_types) +    # On POSIX systems run shell commands with user-preferred shell. +    executable = None +    if shell and os.name == 'posix' and 'SHELL' in os.environ: +        executable = os.environ['SHELL'] +    p = subprocess.Popen(cmd, shell=shell, +                         executable=executable,                           stdin=subprocess.PIPE,                           stdout=subprocess.PIPE,                           stderr=stderr, | 
