diff options
| author | Georg Brandl <georg@python.org> | 2009-02-12 12:09:00 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-02-12 12:09:00 +0100 |
| commit | ab5f3382de69b78866486cde165c027d99bf15a1 (patch) | |
| tree | 81c98d0ac33e568d236a9eb0dbba89fe09341e85 /sphinx/ext | |
| parent | e5b4cbb98e2ca551c97dd016c025b491b14c104c (diff) | |
| download | sphinx-ab5f3382de69b78866486cde165c027d99bf15a1.tar.gz | |
Fix todolist crash when no todo entry is there.
Diffstat (limited to 'sphinx/ext')
| -rw-r--r-- | sphinx/ext/todo.py | 3 |
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([]) |
