diff options
-rw-r--r-- | Lib/subprocess.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py index ffa3bd1..4c66353 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1068,11 +1068,12 @@ class Popen(object): if endtime is not None: timeout = self._remaining_time(endtime) if timeout is None: - timeout = _subprocess.INFINITE + timeout_millis = _subprocess.INFINITE else: - timeout = int(timeout * 1000) + timeout_millis = int(timeout * 1000) if self.returncode is None: - result = _subprocess.WaitForSingleObject(self._handle, timeout) + result = _subprocess.WaitForSingleObject(self._handle, + timeout_millis) if result == _subprocess.WAIT_TIMEOUT: raise TimeoutExpired(self.args, timeout) self.returncode = _subprocess.GetExitCodeProcess(self._handle) |