Skip to content

Commit

Permalink
Merge pull request #432 from SpencerPark/fix-381
Browse files Browse the repository at this point in the history
Configure the connection_file if not already done
  • Loading branch information
minrk authored May 13, 2019
2 parents 043c0e6 + 7b9c834 commit b65f96f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions jupyter_client/kernelapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ class KernelApp(JupyterApp):

def initialize(self, argv=None):
super(KernelApp, self).initialize(argv)

cf_basename = 'kernel-%s.json' % uuid.uuid4()
self.config.setdefault('KernelManager', {}).setdefault('connection_file', os.path.join(self.runtime_dir, cf_basename))
self.km = KernelManager(kernel_name=self.kernel_name,
config=self.config)
cf_basename = 'kernel-%s.json' % uuid.uuid4()
self.km.connection_file = os.path.join(self.runtime_dir, cf_basename)

self.loop = IOLoop.current()
self.loop.add_callback(self._record_started)

Expand Down

0 comments on commit b65f96f

Please sign in to comment.