piranha/opster — pull request #22 by oscarbenjamin (2012-04-21 19:57:07+00:00)
Title: Make exchandle a contextmanager

Hi,

This patch turns ```exchandle``` into a context manager for use in ```with``` statements.

Having just discovered the ```contextmanager``` decorator it occurred to me that it could help here. I think it cleans up the error handling code quite nicely.

It also removes the ```FIXME``` section.

Cheers,
Oscar.