From db97851f36ec994ebef8ed257cff371e15517fa7 Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Fri, 9 Nov 2007 22:52:22 -0800 Subject: [PATCH] [project @ robey@lag.net-20071110065222-xt335qy6c4s6flze] patch from james bardin to allow closing an SSHClient more than once. :) --- paramiko/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paramiko/client.py b/paramiko/client.py index 594bba8..c809e4b 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -294,6 +294,8 @@ class SSHClient (object): """ Close this SSHClient and its underlying L{Transport}. """ + if self._transport is None: + return self._transport.close() self._transport = None