Tue, 08 Apr 2025 15:34:25 +0200
Some change in the pip interface to get rid of a sporadic shutdown issue.
src/eric7/PipInterface/Pip.py | file | annotate | diff | comparison | revisions |
--- a/src/eric7/PipInterface/Pip.py Tue Apr 08 12:37:50 2025 +0200 +++ b/src/eric7/PipInterface/Pip.py Tue Apr 08 15:34:25 2025 +0200 @@ -91,6 +91,7 @@ self.__replies = [] self.__outdatedProc = None + self.__shuttingDown = False self.__vulnerabilityChecker = PipVulnerabilityChecker(self, self) @@ -116,6 +117,7 @@ """ Public method to perform shutdown actions. """ + self.__shuttingDown = True if self.__outdatedProc is not None: self.__outdatedProc.finished.disconnect() self.__outdatedProc.kill() # end the process forcefully @@ -1029,16 +1031,17 @@ @param exitStatus exit status of the process @type QProcess.ExitStatus """ - packages = ( - self.__extractOutdatedPackages(proc) - if ( - not proc.timedOut() - and exitStatus == QProcess.ExitStatus.NormalExit - and exitCode == 0 + if not self.__shuttingDown: + packages = ( + self.__extractOutdatedPackages(proc) + if ( + not proc.timedOut() + and exitStatus == QProcess.ExitStatus.NormalExit + and exitCode == 0 + ) + else {} ) - else {} - ) - callback(packages) + callback(packages) self.__outdatedProc = None def checkPackagesOutdated(self, packageStarts, envName, interpreter=None):