Browse Source

distributed: Assorted error fixes

rdb 5 years ago
parent
commit
2ce373b0da

+ 1 - 1
direct/src/distributed/DistributedCartesianGridAI.py

@@ -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()):

+ 1 - 1
direct/src/distributed/DistributedNodeUD.py

@@ -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):

+ 1 - 3
direct/src/distributed/DoCollectionManager.py

@@ -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