From 82c8d874338998556e15dbe98822515fa4a70a9f Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sun, 2 Jul 2006 22:08:18 -0800 Subject: [PATCH] maybe this will fix the deleting is broken problem... why the assert wasn't being hit I have no clue, but some samples says that this was broken wrt removing all the elements of the array... [git-p4: depot-paths = "//depot/": change = 805] --- ContentDirectory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ContentDirectory.py b/ContentDirectory.py index ec6346f..912f3cc 100644 --- a/ContentDirectory.py +++ b/ContentDirectory.py @@ -66,8 +66,8 @@ class ContentDirectoryControl(UPnPPublisher, dict): def delItem(self, id): if isinstance(self[id], Container): - for i in self.children[id]: - self.delItem(i) + while self.children[id]: + self.delItem(self.children[id][0]) assert len(self.children[id]) == 0 del self.children[id] # Remove from parent