Skip to content

Commit

Permalink
fix: handle KeyboardInterrupt nicely
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed Nov 22, 2024
1 parent 6a24199 commit a90c9ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/pyromark/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import annotations

import argparse
import sys
from collections.abc import Iterator, Sequence
from contextlib import contextmanager
from typing import Optional
Expand Down Expand Up @@ -62,4 +63,7 @@ def _main(args: Optional[Sequence[str]] = None, /) -> None:


if __name__ == "__main__":
_main()
try:
_main()
except KeyboardInterrupt:
sys.exit(130)

0 comments on commit a90c9ab

Please sign in to comment.