mozilla/socorro — pull request #1713 by twobraids (2013-12-05 20:19:40+00:00)
Title: Fixes Bug 946875 - added exception handling to tempfile contextmanager

when invoking stackwalker, the dump file has been written to disk. If something goes wrong and an exception is raised from within the context scope of the temp file, the temp file is not removed.

the solution is to put a ```try ... finally``` around the yield as recommended in the python docs for context managers. This will ensure that the delete code is run when an exception happens within the scope of the contextmanager.