Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
d4c63e33
Commit
d4c63e33
authored
Dec 20, 2012
by
Daniel Hokka Zakrisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure each basedir is only added to the search path once
Fixes #1790.
parent
3a36c024
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
lib/ansible/utils/plugins.py
+9
-4
No files found.
lib/ansible/utils/plugins.py
View file @
d4c63e33
...
...
@@ -58,10 +58,15 @@ class PluginLoader(object):
"""Return a list of paths to search for plugins in
The list is searched in order."""
return
self
.
_extra_dirs
+
\
[
os
.
path
.
join
(
basedir
,
self
.
subdir
)
for
basedir
in
_basedirs
]
+
\
self
.
config
.
split
(
os
.
pathsep
)
+
\
self
.
_get_package_path
()
ret
=
[]
ret
+=
self
.
_extra_dirs
for
basedir
in
_basedirs
:
fullpath
=
os
.
path
.
join
(
basedir
,
self
.
subdir
)
if
fullpath
not
in
ret
:
ret
.
append
(
fullpath
)
ret
+=
self
.
config
.
split
(
os
.
pathsep
)
ret
+=
self
.
_get_package_path
()
return
ret
def
add_directory
(
self
,
directory
):
"""Adds an additional directory to the search path"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment