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