diff -r aa713ac50c0d -r cc717c2ae956 eric6/Utilities/BackgroundService.py --- a/eric6/Utilities/BackgroundService.py Thu Apr 15 16:52:05 2021 +0200 +++ b/eric6/Utilities/BackgroundService.py Thu Apr 15 18:11:24 2021 +0200 @@ -13,6 +13,7 @@ import struct import sys from zlib import adler32 +import contextlib from PyQt5.QtCore import QProcess, pyqtSignal, QTimer from PyQt5.QtWidgets import QApplication @@ -215,14 +216,11 @@ self.enqueueRequest(*self.runningJob) else: fx, lng, fn, data = self.runningJob - try: + with contextlib.suppress(KeyError, TypeError): self.services[(fx, lng)][3](fx, lng, fn, self.tr( "An error in Eric's background client stopped the" " service.") ) - except (KeyError, TypeError): - # ignore silently - pass if res != E5MessageBox.No: self.isWorking = None self.restartService(lang, True)