Creating application.config attribute.

This creates less coupling between the handlers and the outer
IPython application.
This commit is contained in:
Brian E. Granger 2013-01-14 12:07:02 -08:00 committed by Brian Granger
parent ac1a8b0458
commit f37d707c08
2 changed files with 2 additions and 1 deletions

View File

@ -416,7 +416,7 @@ class AuthenticatedZMQStreamHandler(ZMQStreamHandler):
def open(self, kernel_id):
self.kernel_id = kernel_id.decode('ascii')
try:
cfg = self.application.ipython_app.config
cfg = self.application.config
except AttributeError:
# protect from the case where this is run from something other than
# the notebook app:

View File

@ -187,6 +187,7 @@ class NotebookWebApplication(web.Application):
self.cluster_manager = cluster_manager
self.ipython_app = ipython_app
self.read_only = self.ipython_app.read_only
self.config = self.ipython_app.config
self.log = log
self.jinja2_env = Environment(loader=FileSystemLoader(os.path.join(os.path.dirname(__file__), "templates")))