[Zope-CMF] script crashing zope
Chris Withers
chrisw@nipltd.com
Fri, 21 Dec 2001 10:45:28 +0000
Dan Keshet wrote:
>
> 1) Is this a general Zope bug (well, clearly it shouldn't be crashing)
Why not? external methods let you do anything, so if you screw something up,
Zope hasn't really got any chance.
Given that Zope only started crashing when you started using your external
method, I know where I'd start looking for answers ;-)
> def convert(self):
> from Products.CMFDefault.Document import addDocument
Move that import to the top of the .py file
> text = self.document_src()
> title = self.title_or_id()
> id = self.getId()
> self.manage_renameObject(id, id + '.dtml')
> self.manage_addProduct['CMFDefault'].addDocument( id, title, '',
> "html", text)
Seems simple enough, try find out what line it's crashing on by commenting some
of them out...
cheers,
Chris