Skip to content

Commit b3daa05

Browse files
committed
fixing try-except for ets
1 parent d2183a1 commit b3daa05

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

nipype/algorithms/mesh.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,10 @@ def _run_interface(self, runtime):
7474

7575
try:
7676
from enthought.etsconfig.api import ETSConfig
77+
ETSConfig.toolkit = 'null'
7778
except ImportError:
7879
iflogger.warn(('ETS toolkit could not be imported'))
79-
else:
80-
try:
81-
ETSConfig.toolkit = 'null'
82-
except:
83-
iflogger.warn(('ETS toolkit could not be set to \'null\' '
84-
'for headless operation'))
85-
pass
80+
pass
8681

8782
r1 = tvtk.PolyDataReader(file_name=self.inputs.surface1)
8883
r2 = tvtk.PolyDataReader(file_name=self.inputs.surface2)

0 commit comments

Comments
 (0)