diff options
author | Reid Kleckner <reid@kleckner.net> | 2011-03-21 17:06:10 (GMT) |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2011-03-21 17:06:10 (GMT) |
commit | 91156ff3f1b0cd62a1771283f080cc2fe4527838 (patch) | |
tree | 287728a39b6b5464dc46b7b551a132eeefd499f6 /Lib/subprocess.py | |
parent | 0fd59acc7086706db17cc2eb2842bd7f583a4844 (diff) | |
download | cpython-91156ff3f1b0cd62a1771283f080cc2fe4527838.zip cpython-91156ff3f1b0cd62a1771283f080cc2fe4527838.tar.gz cpython-91156ff3f1b0cd62a1771283f080cc2fe4527838.tar.bz2 |
Fix timeout error message on windows to not be in milliseconds.
Diffstat (limited to 'Lib/subprocess.py')
-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) |