Skip to content

Commit

Permalink
fix bug, remove crufty var, add func docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
drammock committed Oct 2, 2023
1 parent 9415da7 commit 92849a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,7 @@ def reset_warnings(gallery_conf, fname):


def check_existing_redirect(path):
"""Make sure existing HTML files are redirects, before overwriting."""
if os.path.isfile(path):
with open(path, "r") as fid:
for _ in range(8):
Expand Down Expand Up @@ -1755,7 +1756,7 @@ def make_redirects(app, exception):
)
# API redirects
for page in api_redirects:
fname = f"{fname}.html"
fname = f"{page}.html"
fr_path = os.path.join(app.outdir, fname)
to_path = os.path.join(app.outdir, "api", fname)
# allow overwrite if existing file is just a redirect
Expand Down Expand Up @@ -1798,7 +1799,6 @@ def make_version(app, exception):
and exception is None
):
return
logger = sphinx.util.logging.getLogger("mne")
try:
stdout, _ = run_subprocess(["git", "rev-parse", "HEAD"], verbose=False)
except Exception as exc:
Expand Down

0 comments on commit 92849a8

Please sign in to comment.