mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Creating application.config attribute.
This creates less coupling between the handlers and the outer IPython application.
This commit is contained in:
parent
ac1a8b0458
commit
f37d707c08
@ -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:
|
||||
|
@ -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")))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user