mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target: Improve error reporting of module installation
If an Exception occurs when installing a module log it explicitly to make it clearer to the user what went wrong.
This commit is contained in:
parent
249b8336b5
commit
76ef9e0364
@ -877,7 +877,11 @@ class Target(object):
|
|||||||
def _install_module(self, mod, **params):
|
def _install_module(self, mod, **params):
|
||||||
if mod.name not in self._installed_modules:
|
if mod.name not in self._installed_modules:
|
||||||
self.logger.debug('Installing module {}'.format(mod.name))
|
self.logger.debug('Installing module {}'.format(mod.name))
|
||||||
mod.install(self, **params)
|
try:
|
||||||
|
mod.install(self, **params)
|
||||||
|
except Exception as e:
|
||||||
|
self.logger.error('Module "{}" failed to install on target'.format(mod.name))
|
||||||
|
raise
|
||||||
self._installed_modules[mod.name] = mod
|
self._installed_modules[mod.name] = mod
|
||||||
else:
|
else:
|
||||||
self.logger.debug('Module {} is already installed.'.format(mod.name))
|
self.logger.debug('Module {} is already installed.'.format(mod.name))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user