##// END OF EJS Templates
move RemoteError import to top-level...
MinRK -
Show More
@@ -84,6 +84,22 b' from IPython.utils.traitlets import (Integer, CBool, CaselessStrEnum, Enum,'
84 from IPython.utils.warn import warn, error
84 from IPython.utils.warn import warn, error
85 import IPython.core.hooks
85 import IPython.core.hooks
86
86
87 # FIXME: do this in a function to avoid circular dependencies
88 # A better solution is to remove IPython.parallel.error,
89 # and place those classes in IPython.core.error.
90
91 class RemoteError(Exception):
92 pass
93
94 def _import_remote_error():
95 global RemoteError
96 try:
97 from IPython.parallel.error import RemoteError
98 except:
99 pass
100
101 _import_remote_error()
102
87 #-----------------------------------------------------------------------------
103 #-----------------------------------------------------------------------------
88 # Globals
104 # Globals
89 #-----------------------------------------------------------------------------
105 #-----------------------------------------------------------------------------
@@ -1705,13 +1721,6 b' class InteractiveShell(SingletonConfigurable):'
1705 self.write_err('No traceback available to show.\n')
1721 self.write_err('No traceback available to show.\n')
1706 return
1722 return
1707
1723
1708 # this import must be done *after* the above call,
1709 # to avoid affecting the exc_info
1710 try:
1711 from IPython.parallel.error import RemoteError
1712 except ImportError:
1713 class RemoteError(Exception): pass
1714
1715 if etype is SyntaxError:
1724 if etype is SyntaxError:
1716 # Though this won't be called by syntax errors in the input
1725 # Though this won't be called by syntax errors in the input
1717 # line, there may be SyntaxError cases with imported code.
1726 # line, there may be SyntaxError cases with imported code.
General Comments 0
You need to be logged in to leave comments. Login now