From d4bc8cebf1d629ff1f3de18ca17af4b1fdde4926 Mon Sep 17 00:00:00 2001 From: Matt Kotsenas Date: Wed, 16 Mar 2016 16:37:59 -0700 Subject: [PATCH] Replace raise with return for Ctrl+C in Windows - Replace the raise `const.CtrlC` with `return const.CtrlC` the match the unix implementation and prevent a stacktrace when cancelling a command on Windows --- thefuck/system/win32.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thefuck/system/win32.py b/thefuck/system/win32.py index 5cfd438e..b09778e1 100644 --- a/thefuck/system/win32.py +++ b/thefuck/system/win32.py @@ -16,7 +16,7 @@ def get_key(): ch = msvcrt.getch() # second call returns the actual key code if ch == b'\x03': - raise const.KEY_CTRL_C + return const.KEY_CTRL_C if ch == b'H': return const.KEY_UP if ch == b'P':