1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-05 18:30:50 +01:00

target: fixed get_installed() on new targets

get_installed() looks in self.executables_directory for the binary. This
may not exist on a target (this is created when setup() is invoked).
This commit updated get_installed() to check whether target_directory
exists first, avoiding the error.
This commit is contained in:
Sergei Trofimov 2015-11-18 18:07:47 +00:00
parent 961f9576e5
commit b53245344b

View File

@ -402,8 +402,9 @@ class Target(object):
return self.path.join(path, name)
except TargetError:
pass # directory does not exist or no executable premssions
if name in self.list_directory(self.executables_directory):
return self.path.join(self.executables_directory, name)
if self.file_exists(self.executables_directory):
if name in self.list_directory(self.executables_directory):
return self.path.join(self.executables_directory, name)
which = get_installed