Skip to content

Commit

Permalink
Merge pull request #38 from Holzhaus/fix-config-restore
Browse files Browse the repository at this point in the history
sphinx: Fix restoring of previous config values
  • Loading branch information
Holzhaus authored Aug 12, 2020
2 parents b5588cd + fd38dad commit e5d2823
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sphinx_multiversion/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def main(argv=None):
"outputdir": os.path.join(
os.path.abspath(args.outputdir), outputdir
),
"confdir": confdir_absolute,
"confdir": confpath,
"docnames": list(project.discover()),
}

Expand Down Expand Up @@ -320,7 +320,7 @@ def main(argv=None):
"-D",
"smv_current_version={}".format(version_name),
"-c",
data["confdir"],
confdir_absolute,
data["sourcedir"],
data["outputdir"],
*args.filenames,
Expand Down
6 changes: 3 additions & 3 deletions sphinx_multiversion/sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ def config_inited(app, config):
app.connect("html-page-context", html_page_context)

# Restore config values
old_config = sphinx_config.Config.read(app.confdir)
old_config = sphinx_config.Config.read(data["confdir"])
old_config.pre_init_values()
old_config.init_values()
config.version = old_config.version
config.release = old_config.release
config.version = data["version"]
config.release = data["release"]
config.today = old_config.today
if not config.today:
config.today = sphinx_i18n.format_date(
Expand Down

0 comments on commit e5d2823

Please sign in to comment.