eric6/VCS/StatusMonitorThread.py

changeset 8240
93b8a353c4bf
parent 8218
7c09585bd960
--- a/eric6/VCS/StatusMonitorThread.py	Wed Apr 14 19:38:19 2021 +0200
+++ b/eric6/VCS/StatusMonitorThread.py	Wed Apr 14 19:59:16 2021 +0200
@@ -7,6 +7,8 @@
 Module implementing the VCS status monitor thread base class.
 """
 
+import contextlib
+
 from PyQt5.QtCore import (
     QThread, QMutex, QWaitCondition, pyqtSignal, QCoreApplication
 )
@@ -173,10 +175,8 @@
         @param name name of the entry to be cleared (string)
         """
         key = self.project.getRelativePath(name)
-        try:
+        with contextlib.suppress(KeyError):
             del self.reportedStates[key]
-        except KeyError:
-            pass
 
     def _performMonitor(self):
         """

eric ide

mercurial