diff --git a/IPython/html/services/sessions/handlers.py b/IPython/html/services/sessions/handlers.py index b194ca6..6d31f61 100644 --- a/IPython/html/services/sessions/handlers.py +++ b/IPython/html/services/sessions/handlers.py @@ -83,11 +83,9 @@ class SessionHandler(IPythonHandler): def patch(self, session_id): # Currently, this handler is strictly for renaming notebooks sm = self.session_manager - nbm = self.notebook_manager - km = self.kernel_manager model = self.get_json_body() if model is None: - raise HTTPError(400, "No JSON data provided") + raise web.HTTPError(400, "No JSON data provided") changes = {} if 'notebook' in model: notebook = model['notebook'] @@ -104,7 +102,6 @@ class SessionHandler(IPythonHandler): def delete(self, session_id): # Deletes the session with given session_id sm = self.session_manager - nbm = self.notebook_manager km = self.kernel_manager session = sm.get_session(id=session_id) sm.delete_session(session_id) diff --git a/IPython/html/services/sessions/sessionmanager.py b/IPython/html/services/sessions/sessionmanager.py index ffec398..193ccc1 100644 --- a/IPython/html/services/sessions/sessionmanager.py +++ b/IPython/html/services/sessions/sessionmanager.py @@ -16,15 +16,13 @@ Authors: # Imports #----------------------------------------------------------------------------- -import os import uuid import sqlite3 from tornado import web from IPython.config.configurable import LoggingConfigurable -from IPython.nbformat import current -from IPython.utils.traitlets import List, Dict, Unicode, TraitError +from IPython.utils.traitlets import TraitError #----------------------------------------------------------------------------- # Classes diff --git a/IPython/html/services/sessions/tests/test_sessions_api.py b/IPython/html/services/sessions/tests/test_sessions_api.py index 1c53d86..743789e 100644 --- a/IPython/html/services/sessions/tests/test_sessions_api.py +++ b/IPython/html/services/sessions/tests/test_sessions_api.py @@ -8,7 +8,6 @@ import shutil pjoin = os.path.join -from IPython.utils.jsonutil import date_default from IPython.html.utils import url_path_join from IPython.html.tests.launchnotebook import NotebookTestBase from IPython.nbformat.current import new_notebook, write