diff options
author | Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 2022-04-17 20:39:51 +0100 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2022-10-17 15:22:06 +0100 |
commit | dd7f65c98facf036914d15e2116103f5acb77a92 (patch) | |
tree | f49183a65a98db62c4bda0d013a2e6c2a3265ebf /sphinx/ext/apidoc.py | |
parent | 2a70006e595825fdab945e83d25793a7992383aa (diff) | |
download | sphinx-git-dd7f65c98facf036914d15e2116103f5acb77a92.tar.gz |
Prefer ``raise SystemExit`` to ``sys.exit``
Diffstat (limited to 'sphinx/ext/apidoc.py')
-rw-r--r-- | sphinx/ext/apidoc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/ext/apidoc.py b/sphinx/ext/apidoc.py index 9bfd69051..e70362d24 100644 --- a/sphinx/ext/apidoc.py +++ b/sphinx/ext/apidoc.py @@ -412,7 +412,7 @@ def main(argv: List[str] = sys.argv[1:]) -> int: args.suffix = args.suffix[1:] if not path.isdir(rootpath): print(__('%s is not a directory.') % rootpath, file=sys.stderr) - sys.exit(1) + raise SystemExit(1) if not args.dryrun: ensuredir(args.destdir) excludes = [path.abspath(exclude) for exclude in args.exclude_pattern] |