Commit d273ae84 authored by Remi Hardy's avatar Remi Hardy

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

parent 2e5d0db7
...@@ -101,6 +101,18 @@ class SSHConnection(): ...@@ -101,6 +101,18 @@ class SSHConnection():
else: else:
sys.exit('SSH Connection Failed') 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): def command(self, commandline, expectedline, timeout):
logging.debug(commandline) logging.debug(commandline)
self.ssh.timeout = timeout self.ssh.timeout = timeout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment