diff --git a/CHANGELOG b/CHANGELOG index 032b5e4b..9d5c5890 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -## 2.9.6-2.9.7 +## 2.9.6 - 2.9.8 - fixed support of GAE + SQL - fixed a typo in the license of some login_methods code. It is now LGPL consistently with the rest of the web2py code. This change applied to all previous web2py versions. diff --git a/Makefile b/Makefile index 33a52a74..3f319bb5 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ update: echo "remember that pymysql was tweaked" src: ### Use semantic versioning - echo 'Version 2.9.7-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION + echo 'Version 2.9.8-stable+timestamp.'`date +%Y.%m.%d.%H.%M.%S` > VERSION ### rm -f all junk files make clean ### clean up baisc apps diff --git a/VERSION b/VERSION index 6b957cff..9baa31e4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.9.7-stable+timestamp.2014.09.06.22.57.21 +Version 2.9.8-stable+timestamp.2014.09.06.23.09.41 diff --git a/scripts/sessions2trash.py b/scripts/sessions2trash.py index 6e11b2a0..e07e731b 100755 --- a/scripts/sessions2trash.py +++ b/scripts/sessions2trash.py @@ -29,6 +29,12 @@ Typical usage: """ from __future__ import with_statement + +import sys +import os +print os.path.join(*__file__.split(os.sep)[:-2] or ['.']) +sys.path.append(os.path.join(*__file__.split(os.sep)[:-2] or ['.'])) + from gluon import current from gluon.storage import Storage from optparse import OptionParser @@ -37,6 +43,7 @@ import datetime import os import stat import time +import glob EXPIRATION_MINUTES = 60 SLEEP_MINUTES = 5 @@ -157,6 +164,9 @@ class SessionFile(object): def delete(self): try: os.unlink(self.filename) + path = os.path.dirname(filename) + if not path.endswith('sessions') and len(os.listdir(path))==0: + os.rmdir(path) except: pass @@ -191,10 +201,11 @@ def single_loop(expiration=None, force=False, verbose=False): except: expiration = EXPIRATION_MINUTES * 60 - set_db = SessionSetDb(expiration, force, verbose) set_files = SessionSetFiles(expiration, force, verbose) - set_db.trash() set_files.trash() + set_db = SessionSetDb(expiration, force, verbose) + set_db.trash() + def main(): """Main processing."""