[Zope] Trapping zope exceptions in python script

Andreas Jung lists at andreas-jung.com
Wed Dec 14 15:06:03 EST 2005



--On 14. Dezember 2005 12:54:56 -0700 Nikko Wolf <nikko-wolf at earthlink.net> 
wrote:
> So you could try this instead:
>
>     for item in itemList:
>        try:
>           context.afolder.manage_delObjects([item])
>        except:
>           continue

Wahhhh... DON'T DO THAT. You should *never* use bare try..excepts within 
Zope applications. This can lead to strange and unpredictable behavior.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20051214/8f73b111/attachment.bin


More information about the Zope mailing list