1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix issue with plugin load path inconsistency

now assures it is always a list of paths and not just assumes it
this avoids issues of parsing a 'string path' and picking up '/' as
a valid path for plugin loader
This commit is contained in:
Brian Coca 2016-04-01 20:25:56 -04:00
parent 0bd6f3a5e8
commit dbc5cc9d7a

View file

@ -61,10 +61,14 @@ class PluginLoader:
self.class_name = class_name
self.base_class = required_base_class
self.package = package
self.config = config
self.subdir = subdir
self.aliases = aliases
if not isinstance(config, list):
config = [config]
self.config = config
if not class_name in MODULE_CACHE:
MODULE_CACHE[class_name] = {}
if not class_name in PATH_CACHE: