From 8e43f4f603bb75f995f7fefd721be48f669105af Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 7 Jan 2011 16:42:18 +0100 Subject: [PATCH] Make warning message consistent; re-read toctree document when include is missing. --- sphinx/directives/other.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index d39a338d5..f59a29e14 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -73,8 +73,9 @@ class TocTree(Directive): entries.append((title, ref)) elif docname not in env.found_docs: ret.append(self.state.document.reporter.warning( - 'toctree references unknown document %r' % docname, - line=self.lineno)) + 'toctree contains reference to nonexisting ' + 'document %r' % docname, line=self.lineno)) + env.note_reread() else: entries.append((title, docname)) includefiles.append(docname)