##// END OF EJS Templates
allow kernel_name to be undefined in requests...
MinRK -
Show More
@@ -45,7 +45,8 b' class SessionRootHandler(IPythonHandler):'
45 try:
45 try:
46 kernel_name = model['kernel']['name']
46 kernel_name = model['kernel']['name']
47 except KeyError:
47 except KeyError:
48 raise web.HTTPError(400, "Missing field in JSON data: kernel.name")
48 self.log.debug("No kernel name specified, using default kernel")
49 kernel_name = None
49
50
50 # Check to see if session exists
51 # Check to see if session exists
51 if sm.session_exists(name=name, path=path):
52 if sm.session_exists(name=name, path=path):
@@ -1,20 +1,7 b''
1 """A base class session manager.
1 """A base class session manager."""
2
2
3 Authors:
3 # Copyright (c) IPython Development Team.
4
4 # Distributed under the terms of the Modified BSD License.
5 * Zach Sailer
6 """
7
8 #-----------------------------------------------------------------------------
9 # Copyright (C) 2013 The IPython Development Team
10 #
11 # Distributed under the terms of the BSD License. The full license is in
12 # the file COPYING, distributed as part of this software.
13 #-----------------------------------------------------------------------------
14
15 #-----------------------------------------------------------------------------
16 # Imports
17 #-----------------------------------------------------------------------------
18
5
19 import uuid
6 import uuid
20 import sqlite3
7 import sqlite3
@@ -25,9 +12,6 b' from IPython.config.configurable import LoggingConfigurable'
25 from IPython.utils.py3compat import unicode_type
12 from IPython.utils.py3compat import unicode_type
26 from IPython.utils.traitlets import Instance
13 from IPython.utils.traitlets import Instance
27
14
28 #-----------------------------------------------------------------------------
29 # Classes
30 #-----------------------------------------------------------------------------
31
15
32 class SessionManager(LoggingConfigurable):
16 class SessionManager(LoggingConfigurable):
33
17
@@ -73,7 +57,7 b' class SessionManager(LoggingConfigurable):'
73 "Create a uuid for a new session"
57 "Create a uuid for a new session"
74 return unicode_type(uuid.uuid4())
58 return unicode_type(uuid.uuid4())
75
59
76 def create_session(self, name=None, path=None, kernel_name='python'):
60 def create_session(self, name=None, path=None, kernel_name=None):
77 """Creates a session and returns its model"""
61 """Creates a session and returns its model"""
78 session_id = self.new_session_id()
62 session_id = self.new_session_id()
79 # allow nbm to specify kernels cwd
63 # allow nbm to specify kernels cwd
General Comments 0
You need to be logged in to leave comments. Login now