Fix builddoc with sphinx <= 1.6

I went to build infra-specs which specifies sphinx==1.5.6 and hit

 Traceback (most recent call last):
   File "setup.py", line 29, in <module>
     pbr=True)
   ...
  File ".../pbr/builddoc.py", line 235, in run
    self._sphinx_run()
  File ".../pbr/builddoc.py", line 162, in _sphinx_run
    freshenv=self.fresh_env, warningiserror=self.warning_is_error)
  File ".../sphinx/application.py", line 244, in __init__
    self._init_builder(self.buildername)
  File "...//sphinx/application.py", line 311, in _init_builder
    raise SphinxError('Builder name %s not registered' % buildername)
 sphinx.errors.SphinxError: Builder name h not registered

It appears to be a typo introduced with
I18bbf693bca2f6e49d822ae2940d2170a2b90ce9; make sure we're walking the
self.builders list; not the string self.builder.

Change-Id: Ic038029c361b3ede48f2b495c74430d3ad1eab82
This commit is contained in:
Ian Wienand 2018-04-24 14:27:40 +10:00
parent 7767c44ab1
commit a562b12446
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ class LocalBuildDoc(setup_command.BuildDoc):
return setup_command.BuildDoc.run(self)
# Sphinx < 1.6
for builder in self.builder:
for builder in self.builders:
self.builder = builder
self.finalize_options()
self._sphinx_run()