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
cbde1c5e
Commit
cbde1c5e
authored
May 04, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix extending non-dict types from doc fragments
parent
b19d426f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
lib/ansible/utils/module_docs.py
+10
-1
No files found.
lib/ansible/utils/module_docs.py
View file @
cbde1c5e
...
@@ -23,6 +23,8 @@ import ast
...
@@ -23,6 +23,8 @@ import ast
import
yaml
import
yaml
import
traceback
import
traceback
from
collections
import
MutableMapping
,
MutableSet
,
MutableSequence
from
ansible
import
utils
from
ansible
import
utils
# modules that are ok that they do not have documentation strings
# modules that are ok that they do not have documentation strings
...
@@ -86,7 +88,14 @@ def get_docstring(filename, verbose=False):
...
@@ -86,7 +88,14 @@ def get_docstring(filename, verbose=False):
if
not
doc
.
has_key
(
key
):
if
not
doc
.
has_key
(
key
):
doc
[
key
]
=
value
doc
[
key
]
=
value
else
:
else
:
doc
[
key
]
.
update
(
value
)
if
isinstance
(
doc
[
key
],
MutableMapping
):
doc
[
key
]
.
update
(
value
)
elif
isinstance
(
doc
[
key
],
MutableSet
):
doc
[
key
]
.
add
(
value
)
elif
isinstance
(
doc
[
key
],
MutableSequence
):
doc
[
key
]
=
sorted
(
frozenset
(
doc
[
key
]
+
value
))
else
:
raise
Exception
(
"Attempt to extend a documentation fragement of unknown type"
)
if
'EXAMPLES'
in
(
t
.
id
for
t
in
child
.
targets
):
if
'EXAMPLES'
in
(
t
.
id
for
t
in
child
.
targets
):
plainexamples
=
child
.
value
.
s
[
1
:]
# Skip first empty line
plainexamples
=
child
.
value
.
s
[
1
:]
# Skip first empty line
...
...
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