Show More
@@ -139,7 +139,13 b' class InteractiveShellApp(Configurable):' | |||||
139 | extra_extension = Unicode('', config=True, |
|
139 | extra_extension = Unicode('', config=True, | |
140 | help="dotted module name of an IPython extension to load." |
|
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 | # Extensions that are always loaded (not configurable) |
|
149 | # Extensions that are always loaded (not configurable) | |
144 | default_extensions = List(Unicode, [u'storemagic'], config=False) |
|
150 | default_extensions = List(Unicode, [u'storemagic'], config=False) | |
145 |
|
151 | |||
@@ -259,6 +265,8 b' class InteractiveShellApp(Configurable):' | |||||
259 | self.log.info("Loading IPython extension: %s" % ext) |
|
265 | self.log.info("Loading IPython extension: %s" % ext) | |
260 | self.shell.extension_manager.load_extension(ext) |
|
266 | self.shell.extension_manager.load_extension(ext) | |
261 | except: |
|
267 | except: | |
|
268 | if self.exit_on_extension_load_failure: | |||
|
269 | raise | |||
262 | msg = ("Error in loading extension: {ext}\n" |
|
270 | msg = ("Error in loading extension: {ext}\n" | |
263 | "Check your config files in {location}".format( |
|
271 | "Check your config files in {location}".format( | |
264 | ext=ext, |
|
272 | ext=ext, | |
@@ -266,6 +274,8 b' class InteractiveShellApp(Configurable):' | |||||
266 | )) |
|
274 | )) | |
267 | self.log.warn(msg, exc_info=True) |
|
275 | self.log.warn(msg, exc_info=True) | |
268 | except: |
|
276 | except: | |
|
277 | if self.exit_on_extension_load_failure: | |||
|
278 | raise | |||
269 | self.log.warn("Unknown error in loading extensions:", exc_info=True) |
|
279 | self.log.warn("Unknown error in loading extensions:", exc_info=True) | |
270 |
|
280 | |||
271 | def init_code(self): |
|
281 | def init_code(self): |
General Comments 0
You need to be logged in to leave comments.
Login now