From ac10c390dc74beb5237812a1d582b2d5bbfbad84 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Tue, 4 Jul 2006 13:10:44 -0800 Subject: [PATCH] handle deleting an item multiple times, log when we do so I can try to track it down.. hmm.. maybe need to throw in a back trace.. [git-p4: depot-paths = "//depot/": change = 813] --- ContentDirectory.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ContentDirectory.py b/ContentDirectory.py index 912f3cc..3ade39c 100644 --- a/ContentDirectory.py +++ b/ContentDirectory.py @@ -65,6 +65,10 @@ class ContentDirectoryControl(UPnPPublisher, dict): return i.id def delItem(self, id): + if not self.has_key(id): + log.msg('already removed:', id) + return + log.msg('removing:', id) if isinstance(self[id], Container): while self.children[id]: self.delItem(self.children[id][0])