diff --git a/VERSION b/VERSION index 289773b4..7ad8bbae 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.2.1 (2012-10-24 16:04:05) stable +Version 2.2.1 (2012-10-25 08:17:22) stable diff --git a/scripts/sessions2trash.py b/scripts/sessions2trash.py index 11e685fc..3995014e 100755 --- a/scripts/sessions2trash.py +++ b/scripts/sessions2trash.py @@ -23,6 +23,7 @@ Typical usage: """ from __future__ import with_statement +from gluon import current from gluon.storage import Storage from optparse import OptionParser import cPickle @@ -93,10 +94,7 @@ class SessionSetDb(SessionSet): def get(self): """Return list of SessionDb instances for existing sessions.""" sessions = [] - tablename = 'web2py_session' - from gluon import current - (record_id_name, table, record_id, unique_key) = \ - current.response._dbtable_and_field + table = current.response.session_db_table for row in table._db(table.id > 0).select(): sessions.append(SessionDb(row)) return sessions @@ -121,9 +119,7 @@ class SessionDb(object): self.row = row def delete(self): - from gluon import current - (record_id_name, table, record_id, unique_key) = \ - current.response._dbtable_and_field + table = current.response.session_db_table self.row.delete_record() table._db.commit()