[dts] [PATCH 1/2] framework: modify the method get_session_before

xinfengx xinfengx.zhao at intel.com
Sun Mar 8 16:23:08 CET 2020


Signed-off-by: xinfengx <xinfengx.zhao at intel.com>
---
 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



More information about the dts mailing list