I made a very small change to HTTPException that helped me get nearly
all the pylons tests running on trunk. Obviously this isn't the
right way to solve the larger problem, but I think it does point us in
the right direction. Basically I added these two lines to
HTTPException's __init__ method:
self.headers = self.wsgi_response.headers
self.set_cookie=self.wsgi_response.set_cookie
That way when Pylons tries to set the headers or throw some cookie
information on the HTTPException instance, it just works.
Seems like a little bit of __getattr__ trickery and we can expose
pretty much all of the expected API.
Am I on the right track, and is this something that might make it into
WebOb itself in the future?
--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users