summaryrefslogtreecommitdiff
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2016-11-20 16:31:07 -0800
committerGregory P. Smith <greg@krypto.org>2016-11-20 16:31:07 -0800
commit82604e03dcdd1ada0d505bd732d7531dde948491 (patch)
tree77bb25922dddc290b5d31ceec14dcdb64627d90b /Lib/subprocess.py
parent439f92ae3d46c7593159f5bb13d5a95495c2b4e7 (diff)
parentf0e98c510dd9bbc77b2ae3ebc888e6fba1549c5d (diff)
downloadcpython-git-82604e03dcdd1ada0d505bd732d7531dde948491.tar.gz
Issue #20572: Remove the subprocess.Popen.wait endtime parameter.
It was deprecated in 3.4 and undocumented prior to that.
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py17
1 files changed, 4 insertions, 13 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index e742a4e199..c40f0179ee 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1027,11 +1027,9 @@ class Popen(object):
return self.returncode
- def wait(self, timeout=None, endtime=None):
+ def wait(self, timeout=None):
"""Wait for child process to terminate. Returns returncode
attribute."""
- if endtime is not None:
- timeout = self._remaining_time(endtime)
if timeout is None:
timeout_millis = _winapi.INFINITE
else:
@@ -1386,21 +1384,14 @@ class Popen(object):
return (pid, sts)
- def wait(self, timeout=None, endtime=None):
+ def wait(self, timeout=None):
"""Wait for child process to terminate. Returns returncode
attribute."""
if self.returncode is not None:
return self.returncode
- # endtime is preferred to timeout. timeout is only used for
- # printing.
- if endtime is not None or timeout is not None:
- if endtime is None:
- endtime = _time() + timeout
- elif timeout is None:
- timeout = self._remaining_time(endtime)
-
- if endtime is not None:
+ if timeout is not None:
+ endtime = _time() + timeout
# Enter a busy loop if we have a timeout. This busy loop was
# cribbed from Lib/threading.py in Thread.wait() at r71065.
delay = 0.0005 # 500 us -> initial delay of 1 ms