Skip to content

Commit c94ca49

Browse files
committed
Invert condition
1 parent f01c4b0 commit c94ca49

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build_docs.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ def main() -> int:
925925
return build_docs_with_lock(args, "build_docs_html.lock")
926926
if args.select_output == "only-html-en":
927927
return build_docs_with_lock(args, "build_docs_html_en.lock")
928-
return 2
928+
return EX_FAILURE
929929

930930

931931
def parse_args() -> argparse.Namespace:
@@ -1074,12 +1074,12 @@ def build_docs_with_lock(args: argparse.Namespace, lockfile_name: str) -> int:
10741074
return EX_FAILURE
10751075

10761076
try:
1077-
return EX_OK if build_docs(args) else EX_FAILURE
1077+
return build_docs(args)
10781078
finally:
10791079
lock.close()
10801080

10811081

1082-
def build_docs(args: argparse.Namespace) -> bool:
1082+
def build_docs(args: argparse.Namespace) -> int:
10831083
"""Build all docs (each language and each version)."""
10841084
logging.info("Full build start.")
10851085
start_time = perf_counter()
@@ -1160,7 +1160,7 @@ def build_docs(args: argparse.Namespace) -> bool:
11601160

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

1163-
return any_build_failed
1163+
return EX_FAILURE if any_build_failed else EX_OK
11641164

11651165

11661166
def parse_versions_from_devguide(http: urllib3.PoolManager) -> Versions:

0 commit comments

Comments
 (0)