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
fd0ff6f1
Commit
fd0ff6f1
authored
Mar 16, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5711 from sivel/plugin-realpath
Use realpath for plugin directories instead of abspath
parents
6144c5e1
5ba67396
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/ansible/utils/plugins.py
+4
-4
No files found.
lib/ansible/utils/plugins.py
View file @
fd0ff6f1
...
@@ -30,7 +30,7 @@ _basedirs = []
...
@@ -30,7 +30,7 @@ _basedirs = []
def
push_basedir
(
basedir
):
def
push_basedir
(
basedir
):
# avoid pushing the same absolute dir more than once
# avoid pushing the same absolute dir more than once
basedir
=
os
.
path
.
abs
path
(
basedir
)
basedir
=
os
.
path
.
real
path
(
basedir
)
if
basedir
not
in
_basedirs
:
if
basedir
not
in
_basedirs
:
_basedirs
.
insert
(
0
,
basedir
)
_basedirs
.
insert
(
0
,
basedir
)
...
@@ -99,7 +99,7 @@ class PluginLoader(object):
...
@@ -99,7 +99,7 @@ class PluginLoader(object):
ret
=
[]
ret
=
[]
ret
+=
self
.
_extra_dirs
ret
+=
self
.
_extra_dirs
for
basedir
in
_basedirs
:
for
basedir
in
_basedirs
:
fullpath
=
os
.
path
.
abs
path
(
os
.
path
.
join
(
basedir
,
self
.
subdir
))
fullpath
=
os
.
path
.
real
path
(
os
.
path
.
join
(
basedir
,
self
.
subdir
))
if
os
.
path
.
isdir
(
fullpath
):
if
os
.
path
.
isdir
(
fullpath
):
files
=
glob
.
glob
(
"
%
s/*"
%
fullpath
)
files
=
glob
.
glob
(
"
%
s/*"
%
fullpath
)
for
file
in
files
:
for
file
in
files
:
...
@@ -111,7 +111,7 @@ class PluginLoader(object):
...
@@ -111,7 +111,7 @@ class PluginLoader(object):
# look in any configured plugin paths, allow one level deep for subcategories
# look in any configured plugin paths, allow one level deep for subcategories
configured_paths
=
self
.
config
.
split
(
os
.
pathsep
)
configured_paths
=
self
.
config
.
split
(
os
.
pathsep
)
for
path
in
configured_paths
:
for
path
in
configured_paths
:
path
=
os
.
path
.
abs
path
(
os
.
path
.
expanduser
(
path
))
path
=
os
.
path
.
real
path
(
os
.
path
.
expanduser
(
path
))
contents
=
glob
.
glob
(
"
%
s/*"
%
path
)
contents
=
glob
.
glob
(
"
%
s/*"
%
path
)
for
c
in
contents
:
for
c
in
contents
:
if
os
.
path
.
isdir
(
c
)
and
c
not
in
ret
:
if
os
.
path
.
isdir
(
c
)
and
c
not
in
ret
:
...
@@ -131,7 +131,7 @@ class PluginLoader(object):
...
@@ -131,7 +131,7 @@ class PluginLoader(object):
''' Adds an additional directory to the search path '''
''' Adds an additional directory to the search path '''
self
.
_paths
=
None
self
.
_paths
=
None
directory
=
os
.
path
.
abs
path
(
directory
)
directory
=
os
.
path
.
real
path
(
directory
)
if
directory
is
not
None
:
if
directory
is
not
None
:
if
with_subdir
:
if
with_subdir
:
...
...
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