Python script returning 0
Hi All 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? Is there a reason for this? Cheers ChrisK
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
participants (2)
-
Chris Keyes -
Evan Simpson