diff options
Diffstat (limited to 'bupper/_ssh_client.py')
-rw-r--r-- | bupper/_ssh_client.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bupper/_ssh_client.py b/bupper/_ssh_client.py index f1c9e23..dec3390 100644 --- a/bupper/_ssh_client.py +++ b/bupper/_ssh_client.py @@ -13,6 +13,7 @@ class SSHConnection: """ _proxy_conn = None _client = None + _remote = None def __init__(self, remote): sock = None @@ -26,6 +27,8 @@ class SSHConnection: self._client.connect(remote.host, remote.port, remote.username, sock = sock) + self._remote = remote + def close(self): if self._client: self._client.close() @@ -43,3 +46,6 @@ class SSHConnection: return self def __exit__(self, exc_type, exc_value, traceback): self.close() + + def __str__(self): + return 'ssh:%s' % str(self._remote) |