Fix#3198: AttributeError is raised when toctree has 'self'.

this regression introduced at dc985ed4.
This commit is contained in:
shimizukawa 2016-12-08 00:34:19 +09:00
parent e739054d80
commit b1abd4629b
3 changed files with 5 additions and 2 deletions

View File

@ -4,7 +4,8 @@ Release 1.5.1 (in development)
Bugs fixed
----------
* #3195: Can not build in parallel.
* #3195: Can not build in parallel
* #3198: AttributeError is raised when toctree has 'self'
Release 1.5 (released Dec 5, 2016)

View File

@ -270,7 +270,7 @@ class Toctree(EnvironmentManager):
# toctree originates
ref = toctreenode['parent']
if not title:
title = clean_astext(self.titles[ref])
title = clean_astext(self.env.titles[ref])
reference = nodes.reference('', '', internal=True,
refuri=ref,
anchorname='',

View File

@ -34,6 +34,8 @@ Contents:
Latest reference <http://sphinx-doc.org/latest/>
Python <http://python.org/>
self
Indices and tables
==================