summaryrefslogtreecommitdiff
path: root/sphinx/ext
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-12-09 23:37:39 +0100
committerGeorg Brandl <georg@python.org>2008-12-09 23:37:39 +0100
commit53ac9896638fcf8a2650c839460a54825fb05a43 (patch)
treea56ebad820ee463e24f62c6326a76f108bd57f84 /sphinx/ext
parentb6fd1d2188bf4c0425c59e2df6ff4898cc877402 (diff)
downloadsphinx-53ac9896638fcf8a2650c839460a54825fb05a43.tar.gz
Fix automethod outside class context.
Diffstat (limited to 'sphinx/ext')
-rw-r--r--sphinx/ext/autodoc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index bb7af93c..ddaba04c 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -321,6 +321,9 @@ class RstGenerator(object):
# ... or from a class directive
if mod_cls is None:
mod_cls = self.env.currclass
+ # ... if still None, there's no way to know
+ if mod_cls is None:
+ return fullname, None, [], args, retann
mod, cls = rpartition(mod_cls, '.')
# if the module name is still missing, get it like above
if not mod and hasattr(self.env, 'autodoc_current_module'):