scipy/scipy — pull request #2476 by tonysyu (2013-05-09 22:04:35+00:00)
Title: `umfpack`: Avoid cleanup if initialization stopped short by ImportError.

When umfpack was not available, `UmfpackContext` did not finish initialization and raised an `ImportError`. If that error was caught, an `AttributeError` was raised because the `__del__` method tried to cleanup attributes that were never initialized:

```
Exception AttributeError: "'UmfpackContext' object has no attribute '_symbolic'" in > ignored
```

Note that the error doesn't actually propagate (possibly because the clean up is occurring in the exception machinery)---it just prints to the terminal. Just for some context, this issue arises in scikit-image here:

https://github.com/scikit-image/scikit-image/blob/master/skimage/segmentation/random_walker_segmentation.py#L19

(Actually, the exception message doesn't print out until the next caught exception, a few lines down.)