You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2014/05/28 17:19:13 UTC
git commit: Add __repr__ and __str__ methods.
Repository: libcloud
Updated Branches:
refs/heads/trunk 1ad8e0396 -> 91f8df844
Add __repr__ and __str__ methods.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/91f8df84
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/91f8df84
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/91f8df84
Branch: refs/heads/trunk
Commit: 91f8df844a1dc0d288b969d89465b707a541efd6
Parents: 1ad8e03
Author: Tomaz Muraus <to...@apache.org>
Authored: Wed May 28 17:16:32 2014 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Wed May 28 17:16:32 2014 +0200
----------------------------------------------------------------------
libcloud/compute/ssh.py | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/91f8df84/libcloud/compute/ssh.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/ssh.py b/libcloud/compute/ssh.py
index fe9d856..af9c43a 100644
--- a/libcloud/compute/ssh.py
+++ b/libcloud/compute/ssh.py
@@ -64,6 +64,13 @@ class SSHCommandTimeoutError(Exception):
message = 'Command didn\'t finish in %s seconds' % (timeout)
super(SSHCommandTimeoutError, self).__init__(message)
+ def __repr__(self):
+ return ('<SSHCommandTimeoutError: cmd="%s",timeout=%s)>' %
+ (self.cmd, self.timeout))
+
+ def __str__(self):
+ return self.message
+
class BaseSSHClient(object):
"""