From a562b124467cba9f3c0d81d83b3fdea96a62f175 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 24 Apr 2018 14:27:40 +1000 Subject: [PATCH] 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 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 --- pbr/builddoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbr/builddoc.py b/pbr/builddoc.py index 167d13e0..4d291fba 100644 --- a/pbr/builddoc.py +++ b/pbr/builddoc.py @@ -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()