Fixes for notebook session manager

This commit is contained in:
Thomas Kluyver 2013-10-24 12:21:43 -07:00
parent e8d357707a
commit bce32ec03b

View File

@ -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):