dont be in 2 pending reparents at once

This commit is contained in:
Joe Shochet 2003-12-14 05:06:11 +00:00
parent 8168ed118e
commit 06f65e5d60
1 changed files with 9 additions and 0 deletions

View File

@ -42,6 +42,15 @@ class ParentMgr:
self.notify.debug("performing wrtReparent of %s to '%s'" %
(repr(child), parentToken))
child.wrtReparentTo(self.token2nodepath[parentToken])
# Since you can only be under one parent at a time any time we
# see a successful request, let's clear you out of everybody
# else's pendingChildren
for key in self.pendingChildren.keys():
childList = self.pendingChildren[key]
if child in childList:
# take him out of the list
del childList[childList.index(child)]
else:
self.notify.warning(
"child %s requested reparent to '%s', not in list" %