1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-07 05:30:44 +00:00

Merge pull request #117 from bjackman/adb-push-error

android: Raise better error when trying to push non-existent file
This commit is contained in:
setrofim 2017-05-02 08:43:24 +01:00 committed by GitHub
commit 4522fe8d23

View File

@ -204,6 +204,8 @@ class AdbConnection(object):
if timeout is None:
timeout = self.timeout
command = "push '{}' '{}'".format(source, dest)
if not os.path.exists(source):
raise HostError('No such file "{}"'.format(source))
return adb_command(self.device, command, timeout=timeout)
def pull(self, source, dest, timeout=None):