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
2ac931d6
Commit
2ac931d6
authored
Aug 27, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ported module_docs to use display
parent
2b28cdc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
lib/ansible/utils/module_docs.py
+10
-4
No files found.
lib/ansible/utils/module_docs.py
View file @
2ac931d6
...
...
@@ -26,6 +26,12 @@ import traceback
from
collections
import
MutableMapping
,
MutableSet
,
MutableSequence
from
ansible.plugins
import
fragment_loader
try
:
from
__main__
import
display
except
ImportError
:
from
ansible.utils.display
import
Display
display
=
Display
()
# modules that are ok that they do not have documentation strings
BLACKLIST_MODULES
=
[
'async_wrapper'
,
'accelerate'
,
'async_status'
...
...
@@ -56,7 +62,8 @@ def get_docstring(filename, verbose=False):
try
:
theid
=
t
.
id
except
AttributeError
as
e
:
continue
#TODO: should log these to figure out why this happens
# skip errors can happen when trying to use the normal code
continue
if
'DOCUMENTATION'
in
theid
:
doc
=
yaml
.
safe_load
(
child
.
value
.
s
)
...
...
@@ -110,9 +117,8 @@ def get_docstring(filename, verbose=False):
elif
'RETURN'
in
theid
:
returndocs
=
child
.
value
.
s
[
1
:]
except
:
traceback
.
print_exc
()
# temp
display
.
error
(
"unable to parse
%
s"
%
filename
)
if
verbose
==
True
:
traceback
.
print_exc
()
print
"unable to parse
%
s"
%
filename
raise
return
doc
,
plainexamples
,
returndocs
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