mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-10-22 10:33:19 +01:00 
			
		
		
		
	utils/ssh: fix pxssh import for pexpect versions >= 4.0
The pexpect module exposes a pxssh class starting from version 4.0. This patch makes uses of the proper pxssh import statement depending on the version of pexpect available in the host. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
This commit is contained in:
		| @@ -23,7 +23,12 @@ import threading | ||||
| import tempfile | ||||
| import shutil | ||||
|  | ||||
| import pxssh | ||||
| import pexpect | ||||
| from distutils.version import StrictVersion as V | ||||
| if V(pexpect.__version__) < V('4.0.0'): | ||||
|     import pxssh | ||||
| else: | ||||
|     from pexpect import pxssh | ||||
| from pexpect import EOF, TIMEOUT, spawn | ||||
|  | ||||
| from devlib.exception import HostError, TargetError, TimeoutError | ||||
|   | ||||
		Reference in New Issue
	
	Block a user