Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #336 from chrisfilo/fix/ipython

fixed error catching for ipython
  • Loading branch information...
commit 38123ea82e8afb732a0f130e78c026dd162c4f54 2 parents c3c45bb + fb9f6cc
@satra satra authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 nipype/pipeline/plugins/ipython.py
View
8 nipype/pipeline/plugins/ipython.py
@@ -8,10 +8,7 @@
import sys
from IPython import __version__ as IPyversion
-try:
- from IPython.parallel.contexts import ConnectionRefusedError
-except:
- pass
+from IPython.parallel.error import TimeoutError
from .base import (DistributedPluginBase, logger, report_crash)
@@ -58,10 +55,11 @@ def run(self, graph, config, updatehash=False):
try:
self.taskclient = self.iparallel.Client()
except Exception, e:
- if isinstance(e, ConnectionRefusedError):
+ if isinstance(e, TimeoutError):
raise Exception("No IPython clients found.")
if isinstance(e, ValueError):
raise Exception("Ipython kernel not installed")
+ raise e
return super(IPythonPlugin, self).run(graph, config, updatehash=updatehash)
def _get_result(self, taskid):
Please sign in to comment.
Something went wrong with that request. Please try again.