distributed: Assorted error fixes

This commit is contained in:
rdb 2020-12-30 22:53:15 +01:00
parent 20f38cad66
commit 2ce373b0da
3 changed files with 3 additions and 5 deletions

View File

@ -97,7 +97,7 @@ class DistributedCartesianGridAI(DistributedNodeAI, CartesianGridBase):
def updateGridTask(self, task=None):
# Run through all grid objects and update their parents if needed
missingObjs = []
for avId in self.gridObjects.keys():
for avId in list(self.gridObjects.keys()):
av = self.gridObjects[avId]
# handle a missing object after it is already gone?
if (av.isEmpty()):

View File

@ -26,7 +26,7 @@ class DistributedNodeUD(DistributedObjectUD):
def setParentStr(self, parentToken):
self.notify.debugCall()
if len(parentTokenStr) > 0:
if len(parentToken) > 0:
self.do_setParent(parentToken)
def setParent(self, parentToken):

View File

@ -270,9 +270,7 @@ class DoCollectionManager:
def deleteDistributedObjects(self):
# Get rid of all the distributed objects
for doId in self.doId2do.keys():
# Look up the object
do = self.doId2do[doId]
for doId, do in list(self.doId2do.items()):
self.deleteDistObject(do)
# Get rid of everything that manages distributed objects