mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Merge pull request #921 from minrk/traiterror
Show invalid config message on TraitErrors during initialization. implemented via `@catch_config` decorator Now, the event that was triggered by invalid app config (see `--log-level 5`) is triggered by bad config at any point during initialization. This *will* catch TraitError-raising bugs in IPython itself, but only during initialization. Also, deregister crash handler on use to avoid it being triggered recursively/repeatedly.
This commit is contained in:
commit
7c04cc70fd
@ -47,6 +47,7 @@ from .handlers import (LoginHandler,
|
||||
)
|
||||
from .notebookmanager import NotebookManager
|
||||
|
||||
from IPython.config.application import catch_config_error
|
||||
from IPython.core.application import BaseIPythonApplication
|
||||
from IPython.core.profiledir import ProfileDir
|
||||
from IPython.zmq.session import Session, default_secure
|
||||
@ -264,6 +265,7 @@ class NotebookApp(BaseIPythonApplication):
|
||||
# and all of its ancenstors until propagate is set to False.
|
||||
self.log.propagate = False
|
||||
|
||||
@catch_config_error
|
||||
def initialize(self, argv=None):
|
||||
super(NotebookApp, self).initialize(argv)
|
||||
self.init_configurables()
|
||||
|
Loading…
Reference in New Issue
Block a user