mirror of
https://github.com/ARM-software/devlib.git
synced 2025-04-15 22:30:05 +01: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:
commit
4522fe8d23
@ -204,6 +204,8 @@ class AdbConnection(object):
|
|||||||
if timeout is None:
|
if timeout is None:
|
||||||
timeout = self.timeout
|
timeout = self.timeout
|
||||||
command = "push '{}' '{}'".format(source, dest)
|
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)
|
return adb_command(self.device, command, timeout=timeout)
|
||||||
|
|
||||||
def pull(self, source, dest, timeout=None):
|
def pull(self, source, dest, timeout=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user