From 0007f2422458523c00feeff68a86167ae7e13dff Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sat, 11 Jul 2009 16:19:55 -0800 Subject: [PATCH] if adding the Object returns None, don't add it... this would cause an incomplete directory to be presented.. [git-p4: depot-paths = "//depot/": change = 1370] --- ContentDirectory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ContentDirectory.py b/ContentDirectory.py index 0a9b04f..5962820 100644 --- a/ContentDirectory.py +++ b/ContentDirectory.py @@ -101,6 +101,8 @@ class ContentDirectoryControl(UPnPPublisher, dict): def addContainer(self, parent, title, klass = Container, *args, **kwargs): ret = self.addObject(parent, klass, title, *args, **kwargs) + if ret is None: + return self.children[ret] = self[ret] return ret