mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Don't load plugins starting with "_".
This commit is contained in:
@@ -486,7 +486,8 @@ def import_plugins(directory):
|
|||||||
modules = {}
|
modules = {}
|
||||||
for path in glob.glob(os.path.join(directory, '*.py')):
|
for path in glob.glob(os.path.join(directory, '*.py')):
|
||||||
name, ext = os.path.splitext(os.path.basename(path))
|
name, ext = os.path.splitext(os.path.basename(path))
|
||||||
modules[name] = imp.load_source(name, path)
|
if not name.startswith("_"):
|
||||||
|
modules[name] = imp.load_source(name, path)
|
||||||
return modules
|
return modules
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user