Corrected some issues related to instantiating plugin manager objects or pip objects with a UI reference that does not contain the shutdown signal. eric7

Sun, 20 Apr 2025 15:41:59 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 20 Apr 2025 15:41:59 +0200
branch
eric7
changeset 11228
7d9e5c627e60
parent 11227
023943c77c42
child 11229
16a129d168f9

Corrected some issues related to instantiating plugin manager objects or pip objects with a UI reference that does not contain the shutdown signal.

src/eric7/PipInterface/Pip.py file | annotate | diff | comparison | revisions
src/eric7/PluginManager/PluginManager.py file | annotate | diff | comparison | revisions
--- a/src/eric7/PipInterface/Pip.py	Fri Apr 18 17:25:18 2025 +0200
+++ b/src/eric7/PipInterface/Pip.py	Sun Apr 20 15:41:59 2025 +0200
@@ -95,7 +95,8 @@
 
         self.__vulnerabilityChecker = PipVulnerabilityChecker(self, self)
 
-        self.__ui.shutdown.connect(self.__shutdown)
+        with contextlib.suppress(AttributeError):
+            self.__ui.shutdown.connect(self.__shutdown)
 
     def getNetworkAccessManager(self):
         """
--- a/src/eric7/PluginManager/PluginManager.py	Fri Apr 18 17:25:18 2025 +0200
+++ b/src/eric7/PluginManager/PluginManager.py	Sun Apr 20 15:41:59 2025 +0200
@@ -179,7 +179,8 @@
             self.__networkManager.sslErrors.connect(self.__sslErrors)
         self.__replies = []
 
-        self.__ui.shutdown.connect(self.__shutdown)
+        with contextlib.suppress(AttributeError):
+            self.__ui.shutdown.connect(self.__shutdown)
 
     def finalizeSetup(self):
         """

eric ide

mercurial