Skip to content

Commit f5dd729

Browse files
committed
Fix typo in WindowsPopen.kill(). Avoid using returncode variable manually, but just route through poll() instead.
1 parent 5ec613c commit f5dd729

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/shared.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, args, bufsize=0, executable=None, stdin=None, stdout=None, st
2929

3030
# Call the process with fixed streams.
3131
self.process = subprocess.Popen(args, bufsize, executable, self.stdin_, self.stdout_, self.stderr_, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags)
32-
32+
3333
def communicate(self, input=None):
3434
output = self.process.communicate(input)
3535
self.returncode = self.process.returncode
@@ -51,10 +51,10 @@ def communicate(self, input=None):
5151
return (output[0], output[1])
5252

5353
def poll(self):
54-
return self.process.returncode
54+
return self.process.poll()
5555

5656
def kill(self):
57-
return self.process.kill
57+
return self.process.kill()
5858

5959
# Install our replacement Popen handler if we are running on Windows to avoid python spawn process function.
6060
if os.name == 'nt':

0 commit comments

Comments
 (0)