From b37e59aa351f11db829fbade2cc00282c199e8ae Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 16 Jul 2023 13:16:52 +0530 Subject: [PATCH] ... --- publish.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/publish.py b/publish.py index e3bcef6f9..cdc313843 100755 --- a/publish.py +++ b/publish.py @@ -102,11 +102,13 @@ def run_man(args: Any) -> None: def run_html(args: Any) -> None: # Force a fresh build otherwise the search index is not correct - shutil.rmtree(os.path.join(docs_dir, '_build', 'dirhtml')) + with suppress(FileNotFoundError): + shutil.rmtree(os.path.join(docs_dir, '_build', 'dirhtml')) call('make FAIL_WARN=1 "OPTS=-D analytics_id=G-XTJK3R7GF2" dirhtml', cwd=docs_dir) add_old_redirects('docs/_build/dirhtml') - shutil.rmtree(os.path.join(docs_dir, '_build', 'html')) + with suppress(FileNotFoundError): + shutil.rmtree(os.path.join(docs_dir, '_build', 'html')) call('make FAIL_WARN=1 "OPTS=-D analytics_id=G-XTJK3R7GF2" html', cwd=docs_dir)