mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Fixes for notebook session manager
This commit is contained in:
parent
e8d357707a
commit
bce32ec03b
@ -133,7 +133,7 @@ class SessionManager(LoggingConfigurable):
|
|||||||
|
|
||||||
query = "SELECT * FROM session WHERE %s" % (' AND '.join(conditions))
|
query = "SELECT * FROM session WHERE %s" % (' AND '.join(conditions))
|
||||||
|
|
||||||
self.cursor.execute(query, kwargs.values())
|
self.cursor.execute(query, list(kwargs.values()))
|
||||||
model = self.cursor.fetchone()
|
model = self.cursor.fetchone()
|
||||||
if model is None:
|
if model is None:
|
||||||
q = []
|
q = []
|
||||||
@ -170,7 +170,7 @@ class SessionManager(LoggingConfigurable):
|
|||||||
raise TypeError("No such column: %r" % column)
|
raise TypeError("No such column: %r" % column)
|
||||||
sets.append("%s=?" % column)
|
sets.append("%s=?" % column)
|
||||||
query = "UPDATE session SET %s WHERE session_id=?" % (', '.join(sets))
|
query = "UPDATE session SET %s WHERE session_id=?" % (', '.join(sets))
|
||||||
self.cursor.execute(query, kwargs.values() + [session_id])
|
self.cursor.execute(query, list(kwargs.values()) + [session_id])
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def row_factory(cursor, row):
|
def row_factory(cursor, row):
|
||||||
|
Loading…
Reference in New Issue
Block a user