Jonathan Vanasco, wtorek 13 października 2009 05:33:
[...]
> the issue is that redirect() raises a "webob.exc" error, which means
> my code get really really messy trying to catch it.

Catch and re-raise HTTPRedirections.

from webob.exc import HTTPRedirection

try:
    stuff()
except HTTPRedirection:
    raise
except e: # other exceptions
    handle_error(e)

.pk.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to