This exception is raised when the timeout expires while waiting for a child process. Attributes: cmd, output, stdout, stderr, timeout
| 167 | |
| 168 | |
| 169 | class 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 | |
| 197 | if _mswindows: |
no outgoing calls
no test coverage detected
searching dependent graphs…