enthought/mayavi — pull request #96 by jenshnielsen (2013-12-24 10:38:59+00:00)
Title: Catch TraitError when trying to set line_width.

Trying to run the imshow example from the mayavi documentation a TraitError is thrown trying to set the line_width. This seems to be because Mayavi expects an AttributeError where a TraitError is thrown. This fixes that by also catching TraitErrors.

```python
import numpy
from mayavi.mlab import *

def test_imshow():
""" Use imshow to visualize a 2D 10x10 random array.
"""
s = numpy.random.random((10,10))
return imshow(s, colormap='gist_earth')
```