1
0
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:
Sergei Trofimov 2018-04-10 10:16:06 +01:00 committed by Marc Bonnici
parent ed9dcdedd7
commit be43d5d9b7
2 changed files with 5 additions and 1 deletions

View File

@ -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')

View File

@ -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: