@@ -536,15 +536,15 @@ def includes_html(self):
536
536
"""Does the build we are running include HTML output?"""
537
537
return self .select_output != "no-html"
538
538
539
- def run (self , http : urllib3 .PoolManager ) -> bool :
539
+ def run (self , http : urllib3 .PoolManager ) -> bool | None :
540
540
"""Build and publish a Python doc, for a language, and a version."""
541
541
start_time = perf_counter ()
542
542
start_timestamp = dt .datetime .now (tz = dt .UTC ).replace (microsecond = 0 )
543
543
logging .info ("Running." )
544
544
try :
545
545
if self .language .html_only and not self .includes_html :
546
546
logging .info ("Skipping non-HTML build (language is HTML-only)." )
547
- return True
547
+ return None # skipped
548
548
self .cpython_repo .switch (self .version .branch_or_tag )
549
549
if self .language .tag != "en" :
550
550
self .clone_translation ()
@@ -557,6 +557,8 @@ def run(self, http: urllib3.PoolManager) -> bool:
557
557
build_duration = perf_counter () - start_time ,
558
558
trigger = trigger_reason ,
559
559
)
560
+ else :
561
+ return None # skipped
560
562
except Exception as err :
561
563
logging .exception ("Badly handled exception, human, please help." )
562
564
if sentry_sdk :
@@ -1073,7 +1075,7 @@ def build_docs(args: argparse.Namespace) -> bool:
1073
1075
built_successfully = builder .run (http )
1074
1076
if built_successfully :
1075
1077
build_succeeded .add ((version .name , language .tag ))
1076
- else :
1078
+ elif built_successfully is not None :
1077
1079
build_failed .add ((version .name , language .tag ))
1078
1080
1079
1081
logging .root .handlers [0 ].setFormatter (
0 commit comments