##// END OF EJS Templates
DEV: Add exit_on_extension_load_failure to InteractiveShellApp.
Scott Sanderson -
Show More
@@ -140,6 +140,12 b' class InteractiveShellApp(Configurable):'
140 140 help="dotted module name of an IPython extension to load."
141 141 )
142 142
143 reraise_ipython_extension_failures = Bool(
144 False,
145 config=True,
146 help="If True, exit on failure to load any extensions.",
147 )
148
143 149 # Extensions that are always loaded (not configurable)
144 150 default_extensions = List(Unicode, [u'storemagic'], config=False)
145 151
@@ -259,6 +265,8 b' class InteractiveShellApp(Configurable):'
259 265 self.log.info("Loading IPython extension: %s" % ext)
260 266 self.shell.extension_manager.load_extension(ext)
261 267 except:
268 if self.exit_on_extension_load_failure:
269 raise
262 270 msg = ("Error in loading extension: {ext}\n"
263 271 "Check your config files in {location}".format(
264 272 ext=ext,
@@ -266,6 +274,8 b' class InteractiveShellApp(Configurable):'
266 274 ))
267 275 self.log.warn(msg, exc_info=True)
268 276 except:
277 if self.exit_on_extension_load_failure:
278 raise
269 279 self.log.warn("Unknown error in loading extensions:", exc_info=True)
270 280
271 281 def init_code(self):
General Comments 0
You need to be logged in to leave comments. Login now