diff -r 59a9a658618c -r 93b8a353c4bf eric6/QScintilla/Shell.py --- a/eric6/QScintilla/Shell.py Wed Apr 14 19:38:19 2021 +0200 +++ b/eric6/QScintilla/Shell.py Wed Apr 14 19:59:16 2021 +0200 @@ -9,6 +9,7 @@ import sys import re +import contextlib from enum import Enum @@ -1891,10 +1892,8 @@ self.dbs.remoteStatement( self.__debugUI.getSelectedDebuggerId(), cmd) while self.inCommandExecution: - try: + with contextlib.suppress(KeyboardInterrupt): QApplication.processEvents() - except KeyboardInterrupt: - pass else: if not self.__echoInput: cmd = self.buff