Skip to content

Commit 1df6bf5

Browse files
committed
Graceful exit on KeyboardInterrupt
1 parent 7d9f20a commit 1df6bf5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mypy/__main__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def console_entry() -> None:
1717
devnull = os.open(os.devnull, os.O_WRONLY)
1818
os.dup2(devnull, sys.stdout.fileno())
1919
sys.exit(2)
20+
except KeyboardInterrupt:
21+
sys.exit(2)
2022

2123

2224
if __name__ == '__main__':

0 commit comments

Comments
 (0)