1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-09-09 21:41:53 +01:00

Added quotes around commands using raw paths

This fixes issues with spaces in path names.
This commit is contained in:
Sebastian Goscik
2016-02-15 15:27:19 +00:00
parent aab487c1ac
commit 1424cebb90
2 changed files with 9 additions and 9 deletions

View File

@@ -167,7 +167,7 @@ class AdbConnection(object):
def push(self, source, dest, timeout=None):
if timeout is None:
timeout = self.timeout
command = 'push {} {}'.format(source, dest)
command = "push '{}' '{}'".format(source, dest)
return adb_command(self.device, command, timeout=timeout)
def pull(self, source, dest, timeout=None):
@@ -179,10 +179,10 @@ class AdbConnection(object):
command = 'shell ls {}'.format(source)
output = adb_command(self.device, command, timeout=timeout)
for line in output.splitlines():
command = 'pull {} {}'.format(line, dest)
command = "pull '{}' '{}'".format(line, dest)
adb_command(self.device, command, timeout=timeout)
return
command = 'pull {} {}'.format(source, dest)
command = "pull '{}' '{}'".format(source, dest)
return adb_command(self.device, command, timeout=timeout)
def execute(self, command, timeout=None, check_exit_code=False, as_root=False):