[dts] [PATCH] framework: avoid error on import pxssh.

Rami Rosen rami.rosen at intel.com
Sun Jun 26 19:58:22 CEST 2016


This patch adds "from pexpect" to the "import pxsh" call. In newer versions
(higher than 4) of python-pexpect, not having "from expect" will cause the 
following error: "ImportError: No module named pxssh".
See also: https://github.com/pexpect/pexpect/issues/302

Signed-off-by: Rami Rosen <rami.rosen at intel.com>
---
 framework/ssh_pexpect.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py
index 96c4409..f0348b6 100644
--- a/framework/ssh_pexpect.py
+++ b/framework/ssh_pexpect.py
@@ -1,6 +1,6 @@
 import time
 import pexpect
-import pxssh
+from pexpect import pxssh
 from debugger import ignore_keyintr, aware_keyintr
 from exception import TimeoutException, SSHConnectionException, SSHSessionDeadException
 from utils import RED, GREEN
-- 
2.7.4



More information about the dts mailing list