mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
Merge pull request #95 from bjackman/android-setup-error
android: Improve error when _setup_ls fails
This commit is contained in:
commit
96ff1aa205
@ -177,7 +177,12 @@ class AdbConnection(object):
|
||||
# versions of the ls tool in Android pre-v7.
|
||||
def _setup_ls(self):
|
||||
command = "shell '(ls -1); echo \"\n$?\"'"
|
||||
output = adb_command(self.device, command, timeout=self.timeout)
|
||||
try:
|
||||
output = adb_command(self.device, command, timeout=self.timeout)
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise HostError(
|
||||
'Failed to set up ls command on Android device. Output:\n'
|
||||
+ e.output)
|
||||
lines = output.splitlines()
|
||||
retval = lines[-1].strip()
|
||||
if int(retval) == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user