##// END OF EJS Templates
pass profile-dir instead of profile to Kernel...
MinRK -
Show More
@@ -253,7 +253,7 b' aliases.update({'
253 253 aliases.pop('f', None)
254 254
255 255 notebook_aliases = [u'port', u'port-retries', u'ip', u'keyfile', u'certfile',
256 u'notebook-dir']
256 u'notebook-dir', u'profile', u'profile-dir']
257 257
258 258 #-----------------------------------------------------------------------------
259 259 # NotebookApp
@@ -474,13 +474,6 b' class NotebookApp(BaseIPythonApplication):'
474 474
475 475 def parse_command_line(self, argv=None):
476 476 super(NotebookApp, self).parse_command_line(argv)
477 if argv is None:
478 argv = sys.argv[1:]
479
480 # Scrub frontend-specific flags
481 self.kernel_argv = swallow_argv(argv, notebook_aliases, notebook_flags)
482 # Kernel should inherit default config file from frontend
483 self.kernel_argv.append("--IPKernelApp.parent_appname='%s'" % self.name)
484 477
485 478 if self.extra_args:
486 479 f = os.path.abspath(self.extra_args[0])
@@ -491,6 +484,15 b' class NotebookApp(BaseIPythonApplication):'
491 484 nbdir = os.path.dirname(f)
492 485 self.config.NotebookManager.notebook_dir = nbdir
493 486
487 def init_kernel_argv(self):
488 """construct the kernel arguments"""
489 # Scrub frontend-specific flags
490 self.kernel_argv = swallow_argv(self.argv, notebook_aliases, notebook_flags)
491 # Kernel should inherit default config file from frontend
492 self.kernel_argv.append("--IPKernelApp.parent_appname='%s'" % self.name)
493 # Kernel should get *absolute* path to profile directory
494 self.kernel_argv.extend(["--profile-dir", self.profile_dir.location])
495
494 496 def init_configurables(self):
495 497 # force Session default to be secure
496 498 default_secure(self.config)
@@ -657,6 +659,7 b' class NotebookApp(BaseIPythonApplication):'
657 659 def initialize(self, argv=None):
658 660 self.init_logging()
659 661 super(NotebookApp, self).initialize(argv)
662 self.init_kernel_argv()
660 663 self.init_configurables()
661 664 self.init_components()
662 665 self.init_webapp()
General Comments 0
You need to be logged in to leave comments. Login now