From 91156ff3f1b0cd62a1771283f080cc2fe4527838 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 21 Mar 2011 10:06:10 -0700 Subject: Fix timeout error message on windows to not be in milliseconds. --- Lib/subprocess.py | 7 ++++--- 1 file 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) -- cgit v0.12