Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf30fec8

Browse files
authored
Skip checking canonical links if nothing was built (#282)
1 parent638d5e6 commitf30fec8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎build_docs.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ def build_docs(args: argparse.Namespace) -> bool:
11011101
switchers_content=render_switchers(versions,languages)
11021102

11031103
build_succeeded=set()
1104-
build_failed=set()
1104+
any_build_failed=False
11051105
cpython_repo=Repository(
11061106
"https://github.com/python/cpython.git",
11071107
args.build_root/_checkout_name(args.select_output),
@@ -1130,7 +1130,7 @@ def build_docs(args: argparse.Namespace) -> bool:
11301130
ifbuilt_successfully:
11311131
build_succeeded.add((version.name,language.tag))
11321132
elifbuilt_successfullyisnotNone:
1133-
build_failed.add((version.name,language.tag))
1133+
any_build_failed=True
11341134

11351135
logging.root.handlers[0].setFormatter(
11361136
logging.Formatter("%(asctime)s %(levelname)s: %(message)s")
@@ -1153,11 +1153,13 @@ def build_docs(args: argparse.Namespace) -> bool:
11531153
args.skip_cache_invalidation,
11541154
http,
11551155
)
1156-
proofread_canonicals(args.www_root,args.skip_cache_invalidation,http)
1156+
ifbuild_succeeded:
1157+
# Only check canonicals if at least one version was built.
1158+
proofread_canonicals(args.www_root,args.skip_cache_invalidation,http)
11571159

11581160
logging.info("Full build done (%s).",format_seconds(perf_counter()-start_time))
11591161

1160-
returnlen(build_failed)==0
1162+
returnany_build_failed
11611163

11621164

11631165
defparse_versions_from_devguide(http:urllib3.PoolManager)->Versions:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp