Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch TraitError when trying to set line_width. #96

Merged
merged 1 commit into from Jan 9, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions mayavi/tools/modules.py
Expand Up @@ -16,6 +16,7 @@

from traits.api import Trait, CArray, Instance, CFloat, \
Any, false, true, TraitTuple, Range, Bool, Property, CInt, Enum, Either
from traits.trait_errors import TraitError
from tvtk.api import tvtk
from tvtk.common import camel2enthought

Expand Down Expand Up @@ -73,10 +74,10 @@ def _opacity_changed(self):
def _line_width_changed(self):
try:
self._target.actor.property.line_width = self.line_width
except AttributeError:
except (AttributeError, TraitError):
try:
self._target.property.line_width = self.line_width
except AttributeError:
except (AttributeError, TraitError):
pass


Expand Down