1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-22 12:58:36 +00:00

Merge pull request #496 from bjackman/docstring-tweaks

Misc clarifications/cleanups
This commit is contained in:
setrofim 2017-10-04 15:56:58 +01:00 committed by GitHub
commit 24d96c2397
2 changed files with 16 additions and 18 deletions

View File

@ -73,10 +73,7 @@ class PluginCache(object):
if self.is_global_alias(plugin_name): if self.is_global_alias(plugin_name):
self.add_global_alias(plugin_name, values, source) self.add_global_alias(plugin_name, values, source)
return return
for name, value in values.iteritems():
self.add_config(plugin_name, name, value, source)
def add_config(self, plugin_name, name, value, source):
if source not in self.sources: if source not in self.sources:
msg = "Source '{}' has not been added to the plugin cache." msg = "Source '{}' has not been added to the plugin cache."
raise RuntimeError(msg.format(source)) raise RuntimeError(msg.format(source))
@ -86,6 +83,7 @@ class PluginCache(object):
msg = 'configuration provided for unknown plugin "{}"' msg = 'configuration provided for unknown plugin "{}"'
raise ConfigError(msg.format(plugin_name)) raise ConfigError(msg.format(plugin_name))
for name, value in values.iteritems():
if (plugin_name not in GENERIC_CONFIGS and if (plugin_name not in GENERIC_CONFIGS and
name not in self.get_plugin_parameters(plugin_name)): name not in self.get_plugin_parameters(plugin_name)):
msg = "'{}' is not a valid parameter for '{}'" msg = "'{}' is not a valid parameter for '{}'"

View File

@ -143,7 +143,7 @@ COMMON_TARGET_PARAMS = [
If additional modules need to be loaded, they may be specified If additional modules need to be loaded, they may be specified
using this parameter. using this parameter.
Please see ``devlab`` documentation for information on the available Please see ``devlib`` documentation for information on the available
modules. modules.
'''), '''),
Parameter('load_default_modules', kind=bool, default=True, Parameter('load_default_modules', kind=bool, default=True,
@ -153,10 +153,10 @@ COMMON_TARGET_PARAMS = [
``True`` would suppress that, ensuring that only the base Target ``True`` would suppress that, ensuring that only the base Target
interface is initialized. interface is initialized.
You may want to set this if there is a problem with one or more default You may want to set this to ``False`` if there is a problem with one
modules on your platform (e.g. your device is unrooted and cpufreq is or more default modules on your platform (e.g. your device is
not accessible to unprivileged users), or if Target initialization is unrooted and cpufreq is not accessible to unprivileged users), or
taking too long for your platform. if ``Target`` initialization is taking too long for your platform.
'''), '''),
] ]