:param stdout: Stdout which was consumed until the timeout occured. :type stdout: ``str`` :param stdout: Stderr which was consumed until the timeout occured. :type stderr: ``str``
(self, cmd, timeout, ssh_connect_timeout, stdout=None, stderr=None)
| 50 | """ |
| 51 | |
| 52 | def __init__(self, cmd, timeout, ssh_connect_timeout, stdout=None, stderr=None): |
| 53 | """ |
| 54 | :param stdout: Stdout which was consumed until the timeout occured. |
| 55 | :type stdout: ``str`` |
| 56 | |
| 57 | :param stdout: Stderr which was consumed until the timeout occured. |
| 58 | :type stderr: ``str`` |
| 59 | """ |
| 60 | self.cmd = cmd |
| 61 | self.timeout = timeout |
| 62 | self.ssh_connect_timeout = ssh_connect_timeout |
| 63 | self.stdout = stdout |
| 64 | self.stderr = stderr |
| 65 | self.message = ( |
| 66 | "Command didn't finish in %s seconds or the SSH connection " |
| 67 | "did not succeed in %s seconds" % (timeout, ssh_connect_timeout) |
| 68 | ) |
| 69 | super(SSHCommandTimeoutError, self).__init__(self.message) |
| 70 | |
| 71 | def __repr__(self): |
| 72 | return ( |