MCPcopy Index your code
hub / github.com/python/cpython / TimeoutExpired

Class TimeoutExpired

Lib/subprocess.py:169–194  ·  view source on GitHub ↗

This exception is raised when the timeout expires while waiting for a child process. Attributes: cmd, output, stdout, stderr, timeout

Source from the content-addressed store, hash-verified

167
168
169class TimeoutExpired(SubprocessError):
170 """This exception is raised when the timeout expires while waiting for a
171 child process.
172
173 Attributes:
174 cmd, output, stdout, stderr, timeout
175 """
176 def __init__(self, cmd, timeout, output=None, stderr=None):
177 self.cmd = cmd
178 self.timeout = timeout
179 self.output = output
180 self.stderr = stderr
181
182 def __str__(self):
183 return ("Command '%s' timed out after %s seconds" %
184 (self.cmd, self.timeout))
185
186 @property
187 def stdout(self):
188 return self.output
189
190 @stdout.setter
191 def stdout(self, value):
192 # There's no obvious reason to set this, but allow it anyway so
193 # .stdout is a transparent alias for .output
194 self.output = value
195
196
197if _mswindows:

Callers 5

_check_timeoutMethod · 0.85
_waitMethod · 0.85
_communicateMethod · 0.85
_wait_pidfdMethod · 0.85
_wait_kqueueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…