[Zope] Python script returning 0

Evan Simpson evan@4-am.com
Wed, 14 Nov 2001 09:08:24 -0500


Chris Keyes wrote:

> Just wondering about this one... I'm writing python scripts that should 
> return 1 if an sucessful and 0 if they fail. When I test them, they 
> return 1 ok, but I never get the 0 value, zope just sits there and 
> doesn't give a response... Using strings rather than integers fixes 
> this. Is this intended behaviour?

A web request is not a very good way to test a Script that produces non-text 
output.  Zope interprets the zero response from the Script as "false", and 
sends a "204: No Content" to the browser.  The browser continues to display 
whatever it had up.

Cheers,

Evan