@@ -1101,7 +1101,7 @@ def build_docs(args: argparse.Namespace) -> bool:
1101
1101
switchers_content = render_switchers (versions , languages )
1102
1102
1103
1103
build_succeeded = set ()
1104
- build_failed = set ()
1104
+ any_build_failed = False
1105
1105
cpython_repo = Repository (
1106
1106
"https://github.com/python/cpython.git" ,
1107
1107
args .build_root / _checkout_name (args .select_output ),
@@ -1130,7 +1130,7 @@ def build_docs(args: argparse.Namespace) -> bool:
1130
1130
if built_successfully :
1131
1131
build_succeeded .add ((version .name , language .tag ))
1132
1132
elif built_successfully is not None :
1133
- build_failed . add (( version . name , language . tag ))
1133
+ any_build_failed = True
1134
1134
1135
1135
logging .root .handlers [0 ].setFormatter (
1136
1136
logging .Formatter ("%(asctime)s %(levelname)s: %(message)s" )
@@ -1153,11 +1153,13 @@ def build_docs(args: argparse.Namespace) -> bool:
1153
1153
args .skip_cache_invalidation ,
1154
1154
http ,
1155
1155
)
1156
- proofread_canonicals (args .www_root , args .skip_cache_invalidation , http )
1156
+ if build_succeeded :
1157
+ # Only check canonicals if at least one version was built.
1158
+ proofread_canonicals (args .www_root , args .skip_cache_invalidation , http )
1157
1159
1158
1160
logging .info ("Full build done (%s)." , format_seconds (perf_counter () - start_time ))
1159
1161
1160
- return len ( build_failed ) == 0
1162
+ return any_build_failed
1161
1163
1162
1164
1163
1165
def parse_versions_from_devguide (http : urllib3 .PoolManager ) -> Versions :
0 commit comments