mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
target: warn if a module is not supported for the target
When you create a target using devlib, you may not set load_default_modules because you want to load a specific list of modules. In that case, raise a warning if one of those modules failed to load, as it is something you are not expecting. In the general case, the standard set of modules are tried to be loaded. We know that they are not supported for all platforms so just emit a debug message.
This commit is contained in:
parent
217a97485b
commit
d0c71fbc86
@ -429,7 +429,11 @@ class Target(object):
|
|||||||
if mod.probe(self):
|
if mod.probe(self):
|
||||||
self._install_module(mod, **params)
|
self._install_module(mod, **params)
|
||||||
else:
|
else:
|
||||||
self.logger.debug('Module {} is not supported by the target'.format(mod.name))
|
msg = 'Module {} is not supported by the target'.format(mod.name)
|
||||||
|
if self.load_default_modules:
|
||||||
|
self.logger.debug(msg)
|
||||||
|
else:
|
||||||
|
self.logger.warning(msg)
|
||||||
|
|
||||||
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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user