From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 88ED65A99 for ; Fri, 17 Jul 2015 11:31:23 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 17 Jul 2015 02:31:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,495,1432623600"; d="scan'208";a="730648925" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 17 Jul 2015 02:31:21 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t6H9VKWq026681; Fri, 17 Jul 2015 17:31:20 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t6H9VH6Q032214; Fri, 17 Jul 2015 17:31:19 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t6H9VHko032210; Fri, 17 Jul 2015 17:31:17 +0800 From: Yong Liu To: dts@dpdk.org Date: Fri, 17 Jul 2015 17:31:16 +0800 Message-Id: <1437125476-32177-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] Remove session from session list after session closed X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2015 09:31:24 -0000 From: Marvin Liu Signed-off-by: Marvin Liu 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() -- 1.9.3