added a class function to check adb returned values from a list

This commit is contained in:
Remi Hardy
2020-07-17 15:28:34 +02:00
parent 2e5d0db742
commit d273ae84f3
+12
View File
@@ -101,6 +101,18 @@ class SSHConnection():
else:
sys.exit('SSH Connection Failed')
def cde_check_value(self, commandline, expected, timeout):
logging.debug(commandline)
self.ssh.timeout = timeout
self.ssh.sendline(commandline)
expected.append(pexpect.EOF)
expected.append(pexpect.TIMEOUT)
self.sshresponse = self.ssh.expect(expected)
return self.sshresponse
def command(self, commandline, expectedline, timeout):
logging.debug(commandline)
self.ssh.timeout = timeout