Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,15 +536,15 @@ def includes_html(self):
"""Does the build we are running include HTML output?"""
return self.select_output != "no-html"

def run(self, http: urllib3.PoolManager) -> bool:
def run(self, http: urllib3.PoolManager) -> bool | None:
"""Build and publish a Python doc, for a language, and a version."""
start_time = perf_counter()
start_timestamp = dt.datetime.now(tz=dt.UTC).replace(microsecond=0)
logging.info("Running.")
try:
if self.language.html_only and not self.includes_html:
logging.info("Skipping non-HTML build (language is HTML-only).")
return True
return None # skipped
self.cpython_repo.switch(self.version.branch_or_tag)
if self.language.tag != "en":
self.clone_translation()
Expand All @@ -557,6 +557,8 @@ def run(self, http: urllib3.PoolManager) -> bool:
build_duration=perf_counter() - start_time,
trigger=trigger_reason,
)
else:
return None # skipped
except Exception as err:
logging.exception("Badly handled exception, human, please help.")
if sentry_sdk:
Expand Down Expand Up @@ -1073,7 +1075,7 @@ def build_docs(args: argparse.Namespace) -> bool:
built_successfully = builder.run(http)
if built_successfully:
build_succeeded.add((version.name, language.tag))
else:
elif built_successfully is not None:
build_failed.add((version.name, language.tag))

logging.root.handlers[0].setFormatter(
Expand Down