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
aedf134f
Commit
aedf134f
authored
May 26, 2014
by
Yang Liping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix portability issue when checking local facts file permission.
parent
92f16b3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
lib/ansible/module_utils/facts.py
+2
-1
No files found.
lib/ansible/module_utils/facts.py
View file @
aedf134f
...
...
@@ -16,6 +16,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
import
os
import
stat
import
array
import
errno
import
fcntl
...
...
@@ -173,7 +174,7 @@ class Facts(object):
for
fn
in
sorted
(
glob
.
glob
(
fact_path
+
'/*.fact'
)):
# where it will sit under local facts
fact_base
=
os
.
path
.
basename
(
fn
)
.
replace
(
'.fact'
,
''
)
if
os
.
access
(
fn
,
os
.
X_OK
)
:
if
stat
.
S_IXUSR
&
os
.
stat
(
fn
)[
stat
.
ST_MODE
]
:
# run it
# try to read it as json first
# if that fails read it with ConfigParser
...
...
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