mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
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 bugs in IPython itself, but only during initialization. closes gh-908
This commit is contained in:
parent
c27de98c35
commit
268c5e778d
@ -43,6 +43,7 @@ from .handlers import (LoginHandler,
|
||||
)
|
||||
from .notebookmanager import NotebookManager
|
||||
|
||||
from IPython.config.application import catch_config
|
||||
from IPython.core.application import BaseIPythonApplication
|
||||
from IPython.core.profiledir import ProfileDir
|
||||
from IPython.zmq.session import Session, default_secure
|
||||
@ -260,6 +261,7 @@ class NotebookApp(BaseIPythonApplication):
|
||||
# and all of its ancenstors until propagate is set to False.
|
||||
self.log.propagate = False
|
||||
|
||||
@catch_config
|
||||
def initialize(self, argv=None):
|
||||
super(NotebookApp, self).initialize(argv)
|
||||
self.init_configurables()
|
||||
|
Loading…
Reference in New Issue
Block a user