@@ -911,20 +911,21 @@ def _checkout_name(select_output: str | None) -> str:
911911 return "cpython"
912912
913913
914- def main () -> None :
914+ def main () -> int :
915915 """Script entry point."""
916916 args = parse_args ()
917917 setup_logging (args .log_directory , args .select_output )
918918 load_environment_variables ()
919919
920920 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
928929
929930
930931def parse_args () -> argparse .Namespace :
@@ -1397,4 +1398,4 @@ def purge_surrogate_key(http: urllib3.PoolManager, surrogate_key: str) -> None:
13971398
13981399
13991400if __name__ == "__main__" :
1400- sys . exit (main ())
1401+ raise SystemExit (main ())
0 commit comments