1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 10:10:46 +00:00

android: Raise better error when trying to push non-existent file

This commit is contained in:
Brendan Jackman 2017-04-28 11:26:35 +01:00
parent b5ecf63638
commit e17b9c33d1

View File

@ -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):