From 6b305ad5843763626237bb86f788528847c84763 2010-01-15 22:39:09 From: Fernando Perez Date: 2010-01-15 22:39:09 Subject: [PATCH] Moved twisted import into a function, so base exception classes in kernel can be imported without twisted present. --- diff --git a/IPython/kernel/__init__.py b/IPython/kernel/__init__.py index cd8d856..55e297c 100755 --- a/IPython/kernel/__init__.py +++ b/IPython/kernel/__init__.py @@ -22,4 +22,4 @@ __docformat__ = "restructuredtext en" # the file COPYING, distributed as part of this software. #----------------------------------------------------------------------------- -from IPython.kernel.error import TaskRejectError \ No newline at end of file +from IPython.kernel.error import TaskRejectError diff --git a/IPython/kernel/error.py b/IPython/kernel/error.py index 23f7cd8..b5f6d24 100644 --- a/IPython/kernel/error.py +++ b/IPython/kernel/error.py @@ -17,8 +17,6 @@ __test__ = {} #------------------------------------------------------------------------------- # Imports #------------------------------------------------------------------------------- -from twisted.python import failure - from IPython.kernel.core import error #------------------------------------------------------------------------------- @@ -179,6 +177,8 @@ class CompositeError(KernelError): raise et, ev, etb def collect_exceptions(rlist, method): + from twisted.python import failure + elist = [] for r in rlist: if isinstance(r, failure.Failure):