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/cmd/quickstart.py | |
parent | 2a70006e595825fdab945e83d25793a7992383aa (diff) | |
download | sphinx-git-dd7f65c98facf036914d15e2116103f5acb77a92.tar.gz |
Prefer ``raise SystemExit`` to ``sys.exit``
Diffstat (limited to 'sphinx/cmd/quickstart.py')
-rw-r--r-- | sphinx/cmd/quickstart.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py index 62c551c14..9cfd670a9 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -228,7 +228,7 @@ def ask_user(d: Dict[str, Any]) -> None: d['path'] = do_prompt(__('Please enter a new root path (or just Enter to exit)'), '', is_path_or_empty) if not d['path']: - sys.exit(1) + raise SystemExit(1) if 'sep' not in d: print() @@ -605,4 +605,4 @@ def main(argv: List[str] = sys.argv[1:]) -> int: if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) + raise SystemExit(main()) |