diff -r 59a9a658618c -r 93b8a353c4bf eric6/VCS/VersionControl.py --- a/eric6/VCS/VersionControl.py Wed Apr 14 19:38:19 2021 +0200 +++ b/eric6/VCS/VersionControl.py Wed Apr 14 19:59:16 2021 +0200 @@ -9,6 +9,7 @@ """ import os +import contextlib from PyQt5.QtCore import ( QObject, QThread, QMutex, QProcess, Qt, pyqtSignal, QCoreApplication @@ -521,10 +522,8 @@ """ if self.vcsSupportCommandOptions(): for key in options: - try: + with contextlib.suppress(KeyError): self.options[key] = options[key] - except KeyError: - pass def vcsGetOptions(self): """ @@ -545,10 +544,8 @@ @param data a dictionary of vcs specific data """ for key in data: - try: + with contextlib.suppress(KeyError): self.otherData[key] = data[key] - except KeyError: - pass def vcsGetOtherData(self): """