Skip to content

Commit

Permalink
Merge 543d320 into 8a1195a
Browse files Browse the repository at this point in the history
  • Loading branch information
tcwalther committed Dec 20, 2017
2 parents 8a1195a + 543d320 commit eb4aa25
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pexpect/popen_spawn.py
Expand Up @@ -24,15 +24,15 @@ class PopenSpawn(SpawnBase):
crlf = '\n'

def __init__(self, cmd, timeout=30, maxread=2000, searchwindowsize=None,
logfile=None, cwd=None, env=None, encoding=None,
codec_errors='strict'):
logfile=None, cwd=None, env=None, encoding=None,
codec_errors='strict', preexec_fn=None):
super(PopenSpawn, self).__init__(timeout=timeout, maxread=maxread,
searchwindowsize=searchwindowsize, logfile=logfile,
encoding=encoding, codec_errors=codec_errors)

kwargs = dict(bufsize=0, stdin=subprocess.PIPE,
stderr=subprocess.STDOUT, stdout=subprocess.PIPE,
cwd=cwd, env=env)
cwd=cwd, preexec_fn=preexec_fn, env=env)

if sys.platform == 'win32':
startupinfo = subprocess.STARTUPINFO()
Expand Down Expand Up @@ -124,7 +124,7 @@ def writelines(self, sequence):

def send(self, s):
'''Send data to the subprocess' stdin.
Returns the number of bytes written.
'''
s = self._coerce_send_string(s)
Expand All @@ -148,7 +148,7 @@ def sendline(self, s=''):

def wait(self):
'''Wait for the subprocess to finish.
Returns the exit code.
'''
status = self.proc.wait()
Expand All @@ -163,7 +163,7 @@ def wait(self):

def kill(self, sig):
'''Sends a Unix signal to the subprocess.
Use constants from the :mod:`signal` module to specify which signal.
'''
if sys.platform == 'win32':
Expand Down

0 comments on commit eb4aa25

Please sign in to comment.