Skip to content

Commit 1832816

Browse files
committed
fix(docs/conf.py): Remove missing_ok=True until Python 3.7 deprecated
1 parent c83e0fc commit 1832816

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,10 @@ def remove_tabs_js(app: "Sphinx", exc: Exception) -> None:
245245
# Fix for sphinx-inline-tabs#18
246246
if app.builder.format == "html" and not exc:
247247
tabs_js = Path(app.builder.outdir) / "_static" / "tabs.js"
248-
tabs_js.unlink(missing_ok=True)
248+
try:
249+
tabs_js.unlink() # use missing_ok=True when python 3.7 deprecated
250+
except FileNotFoundError:
251+
pass
249252

250253

251254
def setup(app: "Sphinx") -> None:

0 commit comments

Comments
 (0)