src/eric7/PipInterface/Pip.py

branch
eric7
changeset 11212
c8fc753176c6
parent 11148
15e30f0c76a8
child 11215
d07c71a34adf
equal deleted inserted replaced
11211:3e649cf5082c 11212:c8fc753176c6
89 self.__sslErrorHandler.sslErrorsReply 89 self.__sslErrorHandler.sslErrorsReply
90 ) 90 )
91 self.__replies = [] 91 self.__replies = []
92 92
93 self.__outdatedProc = None 93 self.__outdatedProc = None
94 self.__shuttingDown = False
94 95
95 self.__vulnerabilityChecker = PipVulnerabilityChecker(self, self) 96 self.__vulnerabilityChecker = PipVulnerabilityChecker(self, self)
96 97
97 def getNetworkAccessManager(self): 98 def getNetworkAccessManager(self):
98 """ 99 """
114 115
115 def shutdown(self): 116 def shutdown(self):
116 """ 117 """
117 Public method to perform shutdown actions. 118 Public method to perform shutdown actions.
118 """ 119 """
120 self.__shuttingDown = True
119 if self.__outdatedProc is not None: 121 if self.__outdatedProc is not None:
120 self.__outdatedProc.finished.disconnect() 122 self.__outdatedProc.finished.disconnect()
121 self.__outdatedProc.kill() # end the process forcefully 123 self.__outdatedProc.kill() # end the process forcefully
122 self.__outdatedProc = None 124 self.__outdatedProc = None
123 125
1027 @param exitCode exit code of the process 1029 @param exitCode exit code of the process
1028 @type int 1030 @type int
1029 @param exitStatus exit status of the process 1031 @param exitStatus exit status of the process
1030 @type QProcess.ExitStatus 1032 @type QProcess.ExitStatus
1031 """ 1033 """
1032 packages = ( 1034 if not self.__shuttingDown:
1033 self.__extractOutdatedPackages(proc) 1035 packages = (
1034 if ( 1036 self.__extractOutdatedPackages(proc)
1035 not proc.timedOut() 1037 if (
1036 and exitStatus == QProcess.ExitStatus.NormalExit 1038 not proc.timedOut()
1037 and exitCode == 0 1039 and exitStatus == QProcess.ExitStatus.NormalExit
1040 and exitCode == 0
1041 )
1042 else {}
1038 ) 1043 )
1039 else {} 1044 callback(packages)
1040 )
1041 callback(packages)
1042 self.__outdatedProc = None 1045 self.__outdatedProc = None
1043 1046
1044 def checkPackagesOutdated(self, packageStarts, envName, interpreter=None): 1047 def checkPackagesOutdated(self, packageStarts, envName, interpreter=None):
1045 """ 1048 """
1046 Public method to check, if groups of packages are outdated. 1049 Public method to check, if groups of packages are outdated.

eric ide

mercurial