mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix timeout error message on windows to not be in milliseconds.
This commit is contained in:
parent
0fd59acc70
commit
91156ff3f1
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue