From fa385f908ee7d6b9b415ba3bbb0d3157375a5be6 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 20 Jan 2018 21:24:14 +0900 Subject: [PATCH] latex: Use config-inited event for validation --- sphinx/builders/latex.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sphinx/builders/latex.py b/sphinx/builders/latex.py index 088f5d9ef..0c18b2901 100644 --- a/sphinx/builders/latex.py +++ b/sphinx/builders/latex.py @@ -262,9 +262,9 @@ class LaTeXBuilder(Builder): path.join(self.srcdir, src), err) -def validate_config_values(app): - # type: (Sphinx) -> None - for document in app.config.latex_documents: +def validate_config_values(app, config): + # type: (Sphinx, Config) -> None + for document in config.latex_documents: try: text_type(document[2]) except UnicodeDecodeError: @@ -304,7 +304,7 @@ def default_latex_docclass(config): def setup(app): # type: (Sphinx) -> Dict[unicode, Any] app.add_builder(LaTeXBuilder) - app.connect('builder-inited', validate_config_values) + app.connect('config-inited', validate_config_values) app.add_config_value('latex_engine', default_latex_engine, None, ENUM('pdflatex', 'xelatex', 'lualatex', 'platex'))