Browse Source

if we run into trouble instanciating the class, print it out

and continue.. otherwise we would end up w/ an unorder, incomplete
container..

[git-p4: depot-paths = "//depot/": change = 1346]
main
John-Mark Gurney 15 years ago
parent
commit
801ed1e6dd
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      ContentDirectory.py

+ 7
- 1
ContentDirectory.py View File

@@ -114,7 +114,13 @@ class ContentDirectoryControl(UPnPPublisher, dict):
'''If the generated object (by klass) has an attribute content, it is installed into the web server.'''
assert isinstance(self[parent], Container)
nid = self.getnextID()
i = klass(self, nid, parent, title, *args, **kwargs)
try:
i = klass(self, nid, parent, title, *args, **kwargs)
except:
import traceback
traceback.print_exc()
return

if hasattr(i, 'content'):
self.webbase.putChild(nid, i.content)
#log.msg('children:', `self.children[parent]`, `i`)


Loading…
Cancel
Save