Browse Source

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]
v0.3
John-Mark Gurney 18 years ago
parent
commit
82c8d87433
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      ContentDirectory.py

+ 2
- 2
ContentDirectory.py View File

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


Loading…
Cancel
Save