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:
MinRK 2011-10-22 10:46:33 -07:00
parent c27de98c35
commit 268c5e778d

View File

@ -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()