Docs: use pydoc to read docstrings

This ensures that the extra whitespace is removed appropriately.

Change-Id: I0d6a6c1164c86875cd139516e592442f67eaf437
This commit is contained in:
Zane Bitter 2014-02-25 16:20:16 -05:00
parent 9dd525fc6a
commit f39458bab2
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ from heat.openstack.common.gettextutils import _
from docutils import nodes
from sphinx.util.compat import Directive
import pydoc
class resourcepages(nodes.General, nodes.Element):
@ -52,7 +53,7 @@ class ResourcePages(Directive):
warning = nodes.note('', para)
section.append(warning)
cls_doc = resource_class.__doc__
cls_doc = pydoc.getdoc(resource_class)
if cls_doc:
para = nodes.paragraph('', cls_doc)
section.append(para)