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
a9ea3136
Commit
a9ea3136
authored
Feb 23, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use yaml.safe_load as we are just using basic data structures
parent
7650d7c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/ansible/utils/__init__.py
+2
-2
No files found.
lib/ansible/utils/__init__.py
View file @
a9ea3136
...
@@ -237,7 +237,7 @@ def parse_json(raw_data):
...
@@ -237,7 +237,7 @@ def parse_json(raw_data):
def
parse_yaml
(
data
):
def
parse_yaml
(
data
):
''' convert a yaml string to a data structure '''
''' convert a yaml string to a data structure '''
return
yaml
.
load
(
data
)
return
yaml
.
safe_
load
(
data
)
def
process_yaml_error
(
exc
,
data
,
path
=
None
):
def
process_yaml_error
(
exc
,
data
,
path
=
None
):
if
hasattr
(
exc
,
'problem_mark'
):
if
hasattr
(
exc
,
'problem_mark'
):
...
@@ -345,7 +345,7 @@ def _gitinfo():
...
@@ -345,7 +345,7 @@ def _gitinfo():
# Check if the .git is a file. If it is a file, it means that we are in a submodule structure.
# Check if the .git is a file. If it is a file, it means that we are in a submodule structure.
if
os
.
path
.
isfile
(
repo_path
):
if
os
.
path
.
isfile
(
repo_path
):
try
:
try
:
gitdir
=
yaml
.
load
(
open
(
repo_path
))
.
get
(
'gitdir'
)
gitdir
=
yaml
.
safe_
load
(
open
(
repo_path
))
.
get
(
'gitdir'
)
# There is a posibility the .git file to have an absolute path.
# There is a posibility the .git file to have an absolute path.
if
os
.
path
.
isabs
(
gitdir
):
if
os
.
path
.
isabs
(
gitdir
):
repo_path
=
gitdir
repo_path
=
gitdir
...
...
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