Skip to content

new-style and classic-style exceptions with python 2.4 #81

Closed
anandology opened this Issue Jul 7, 2011 · 1 comment

1 participant

@anandology

This issue was reported in the mailing list.

http://groups.google.com/group/webpy/browse_thread/thread/67c6abc6f23973b3


I've come across a small bug with web.py on python 2.4 (which is what I'm stuck with for the forseeable future).

The following works fine:

class Handler1(object):
    def GET():
        raise web.Redirect('/someotherurl')

but this:

class Handler2(object):
    def GET():
        raise web.Forbidden()

fails with the message:

TypeError: exceptions must be classes, instances, or strings (deprecated), not Forbidden

@anandology

Fixed by #82.

@anandology anandology closed this Jul 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.