mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
fw/config: add plugin_paths property to settings
Add plugin_paths property to settings which combines plugins_directory with extra_plugin_paths, and use that inside pluginloader.
This commit is contained in:
parent
ed9dcdedd7
commit
be43d5d9b7
@ -476,6 +476,10 @@ class MetaConfiguration(Configuration):
|
||||
def plugins_directory(self):
|
||||
return os.path.join(self.user_directory, 'plugins')
|
||||
|
||||
@property
|
||||
def plugin_paths(self):
|
||||
return [self.plugins_directory] + (self.extra_plugin_paths or [])
|
||||
|
||||
@property
|
||||
def user_config_file(self):
|
||||
return os.path.join(self.user_directory, 'config.yaml')
|
||||
|
@ -38,7 +38,7 @@ class __LoaderWrapper(object):
|
||||
from wa.framework.plugin import PluginLoader
|
||||
from wa.framework.configuration.core import settings
|
||||
self._loader = PluginLoader(settings.plugin_packages,
|
||||
[settings.plugins_directory], [])
|
||||
settings.plugin_paths, [])
|
||||
|
||||
def update(self, packages=None, paths=None, ignore_paths=None):
|
||||
if not self._loader:
|
||||
|
Loading…
x
Reference in New Issue
Block a user