Does anyone see anything terrible wrong with this code?

class add:
        """Takes add POST request, and redirects to relevant page"""
        def POST(self):
                i = web.input()
                ip = str(web.ctx.get('ip'))
                now = str(datetime.datetime.now())
                try:
                        if i.captcha != i.captcha_awns: raise ValueError
                        print("good")
                        DripRequest(now, i.address, i.coupon, ip).save()
                        raise web.seeother('/good')
                except ValueError:
                        print("bad")
                        raise web.seeother('/bad')
                except LookupError:
                        print("duplicate")
                        raise web.seeother('/duplicate')

Half of the time it works fine, the other half of the time when I request the 
/add page it just redirects to a blank page and does nothing.

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to webpy+unsubscr...@googlegroups.com.
To post to this group, send email to webpy@googlegroups.com.
Visit this group at http://groups.google.com/group/webpy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to