summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Waltman <jonathan.waltman@gmail.com>2013-01-05 21:08:22 -0600
committerJonathan Waltman <jonathan.waltman@gmail.com>2013-01-05 21:08:22 -0600
commit97bcd18d812af177acd37a2d8a6d990796ab2105 (patch)
tree6be9abe044973df64acdda408273a8aec74c7749
parente15877cc2a9621723f66a5634b84303753065458 (diff)
downloadsphinx-97bcd18d812af177acd37a2d8a6d990796ab2105.tar.gz
autodoc: Don't rely on reporter.get_source_and_line existing for debug messages.
-rw-r--r--sphinx/ext/autodoc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py
index 300c4f22..4563b35b 100644
--- a/sphinx/ext/autodoc.py
+++ b/sphinx/ext/autodoc.py
@@ -1305,7 +1305,10 @@ class AutoDirective(Directive):
self.warnings = []
self.result = ViewList()
- source, lineno = self.reporter.get_source_and_line(self.lineno)
+ try:
+ source, lineno = self.reporter.get_source_and_line(self.lineno)
+ except AttributeError:
+ source = lineno = None
self.env.app.debug('%s:%s: <input>\n%s',
source, lineno, self.block_text)