From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8E102A052E; Mon, 9 Mar 2020 01:43:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 36CD82BE6; Mon, 9 Mar 2020 01:43:37 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 099953B5 for ; Mon, 9 Mar 2020 01:43:35 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2020 17:43:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,530,1574150400"; d="scan'208";a="414635960" Received: from unknown (HELO dpdk-xinfengx-dut.sh.intel.com) ([10.67.117.16]) by orsmga005.jf.intel.com with ESMTP; 08 Mar 2020 17:43:33 -0700 From: xinfengx To: dts@dpdk.org Cc: xinfengx Date: Sun, 8 Mar 2020 23:23:08 +0800 Message-Id: <20200308152309.46637-1-xinfengx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH 1/2] framework: modify the method get_session_before 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: xinfengx --- framework/ssh_pexpect.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py index 8889016..e851cbf 100644 --- a/framework/ssh_pexpect.py +++ b/framework/ssh_pexpect.py @@ -109,16 +109,11 @@ class SSHPexpect: """ ignore_keyintr() self.session.PROMPT = self.magic_prompt - try: - self.session.prompt(timeout) - except Exception as e: - pass - + output = self.session.try_read_prompt(timeout) aware_keyintr() - before = self.get_output_all() self.__flush() - return before + return output def __flush(self): """ -- 2.17.1