Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for index, base in enumerate(baseList):
if base.podName == dependency:
returnList.append(index)
tempMark = True
if False == tempMark:
return returnList
return returnList
returnList = []
nextList = list(manifestPodList)
while 0 < len(nextList):
doingList = list(nextList)
for manifestPod in doingList:
baseIndexes = getBaseIndexes(manifestPod.podDependencies, returnList)
if len(baseIndexes) == len(manifestPod.podDependencies):
returnList.append(PodClass(manifestPod.podName, baseIndexes))
nextList.remove(manifestPod)
# 权重
for baseIndex in baseIndexes:
returnList[baseIndex].podReferenceCount += 1
# print(str(baseIndex) + "+= 1, podReferenceCount = " + str(returnList[baseIndex].podReferenceCount))
return returnList