@@ -911,20 +911,21 @@ def _checkout_name(select_output: str | None) -> str:
911
911
return "cpython"
912
912
913
913
914
- def main () -> None :
914
+ def main () -> int :
915
915
"""Script entry point."""
916
916
args = parse_args ()
917
917
setup_logging (args .log_directory , args .select_output )
918
918
load_environment_variables ()
919
919
920
920
if args .select_output is None :
921
- build_docs_with_lock (args , "build_docs.lock" )
922
- elif args .select_output == "no-html" :
923
- build_docs_with_lock (args , "build_docs_archives.lock" )
924
- elif args .select_output == "only-html" :
925
- build_docs_with_lock (args , "build_docs_html.lock" )
926
- elif args .select_output == "only-html-en" :
927
- build_docs_with_lock (args , "build_docs_html_en.lock" )
921
+ return build_docs_with_lock (args , "build_docs.lock" )
922
+ if args .select_output == "no-html" :
923
+ return build_docs_with_lock (args , "build_docs_archives.lock" )
924
+ if args .select_output == "only-html" :
925
+ return build_docs_with_lock (args , "build_docs_html.lock" )
926
+ if args .select_output == "only-html-en" :
927
+ return build_docs_with_lock (args , "build_docs_html_en.lock" )
928
+ return 2
928
929
929
930
930
931
def parse_args () -> argparse .Namespace :
@@ -1397,4 +1398,4 @@ def purge_surrogate_key(http: urllib3.PoolManager, surrogate_key: str) -> None:
1397
1398
1398
1399
1399
1400
if __name__ == "__main__" :
1400
- sys . exit (main ())
1401
+ raise SystemExit (main ())
0 commit comments