summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Liu <yong.liu@intel.com>2015-07-17 17:31:16 +0800
committerMarvin Liu <yong.liu@intel.com>2015-07-20 09:20:52 +0800
commit00f5c64f3f1696bd6f8c1bc47aab2c9f3291f5b8 (patch)
treedbc40a4bdcc841b0619f66f7369bb3bfb4ab30f1
parenteb59ca3baeaa82e7da574582609efa0add32896d (diff)
downloaddts-00f5c64f3f1696bd6f8c1bc47aab2c9f3291f5b8.zip
dts-00f5c64f3f1696bd6f8c1bc47aab2c9f3291f5b8.tar.gz
dts-00f5c64f3f1696bd6f8c1bc47aab2c9f3291f5b8.tar.xz
Remove session from session list after session closed
Signed-off-by: Marvin Liu <yong.liu@intel.com>
-rw-r--r--framework/ssh_connection.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/framework/ssh_connection.py b/framework/ssh_connection.py
index 3ee9665..63b8785 100644
--- a/framework/ssh_connection.py
+++ b/framework/ssh_connection.py
@@ -68,6 +68,12 @@ class SSHConnection(object):
def close(self):
self.session.close()
+ connection = {}
+ connection[self.name] = self.session
+ try:
+ CONNECTIONS.remove(connection)
+ except:
+ pass
def isalive(self):
return self.session.isalive()