From ee38a4244a3175ff290c1cbc3161e3c2c18a7824 Mon Sep 17 00:00:00 2001 From: Brendan Jackman Date: Fri, 18 Nov 2016 17:48:48 +0000 Subject: [PATCH] android: Fix whitespace in wildcard match for ADB pull When there are multiple matches for the wildcard, the output has been observed to have a space at the end. That means the pull command doesn't work. This commit fixes that. --- devlib/utils/android.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/utils/android.py b/devlib/utils/android.py index 533835c..6e56c58 100644 --- a/devlib/utils/android.py +++ b/devlib/utils/android.py @@ -210,7 +210,7 @@ class AdbConnection(object): command = 'shell {} {}'.format(self.ls_command, source) output = adb_command(self.device, command, timeout=timeout) for line in output.splitlines(): - command = "pull '{}' '{}'".format(line, dest) + command = "pull '{}' '{}'".format(line.strip(), dest) adb_command(self.device, command, timeout=timeout) return command = "pull '{}' '{}'".format(source, dest)