Fix KeysView object does not support indexing in py3

This commit is contained in:
Takeshi KOMIYA 2018-01-25 10:53:44 +09:00
parent 2be87e4851
commit 5cdec60c26
2 changed files with 2 additions and 2 deletions

View File

@ -372,7 +372,7 @@ class BuildEnvironment(object):
break
else:
# document does not exist
suffix = self.config.source_suffix.keys()[0]
suffix = list(self.config.source_suffix)[0]
if base is True:
return path.join(self.srcdir, docname) + suffix
elif base is None:

View File

@ -603,7 +603,7 @@ def process_generate_options(app):
from sphinx.ext.autosummary.generate import generate_autosummary_docs
ext = app.config.source_suffix.keys()
ext = list(app.config.source_suffix)
genfiles = [genfile + (not genfile.endswith(tuple(ext)) and ext[0] or '')
for genfile in genfiles]