Implemented a workaround for an action disconnect issue. eric7

Mon, 14 Feb 2022 19:01:43 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 14 Feb 2022 19:01:43 +0100
branch
eric7
changeset 8949
bab82fd15a6b
parent 8948
9ddea4f0ad87
child 8950
5644299d912e

Implemented a workaround for an action disconnect issue.

eric7/JediInterface/AssistantJedi.py file | annotate | diff | comparison | revisions
--- a/eric7/JediInterface/AssistantJedi.py	Sun Feb 13 15:41:58 2022 +0100
+++ b/eric7/JediInterface/AssistantJedi.py	Mon Feb 14 19:01:43 2022 +0100
@@ -153,7 +153,8 @@
         menu = editor.getMenu("Main")
         if menu is not None and editor in self.__menuActions:
             for act in self.__menuActions[editor]:
-                menu.removeAction(act)
+                with contextlib.suppress(RuntimeError):
+                    menu.removeAction(act)
             del self.__menuActions[editor]
     
     def __connectMouseClickHandler(self, editor):

eric ide

mercurial