summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-02-12 12:09:00 +0100
committerGeorg Brandl <georg@python.org>2009-02-12 12:09:00 +0100
commitab5f3382de69b78866486cde165c027d99bf15a1 (patch)
tree81c98d0ac33e568d236a9eb0dbba89fe09341e85
parente5b4cbb98e2ca551c97dd016c025b491b14c104c (diff)
downloadsphinx-ab5f3382de69b78866486cde165c027d99bf15a1.tar.gz
Fix todolist crash when no todo entry is there.
-rw-r--r--sphinx/ext/todo.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/ext/todo.py b/sphinx/ext/todo.py
index dac90660..c8c6412c 100644
--- a/sphinx/ext/todo.py
+++ b/sphinx/ext/todo.py
@@ -61,6 +61,9 @@ def process_todo_nodes(app, doctree, fromdocname):
# Augment each todo with a backlink to the original location.
env = app.builder.env
+ if not hasattr(env, 'todo_all_todos'):
+ env.todo_all_todos = []
+
for node in doctree.traverse(todolist):
if not app.config['todo_include_todos']:
node.replace_self([])