diff options
-rwxr-xr-x | ipsilon/ipsilon | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ipsilon/ipsilon b/ipsilon/ipsilon index 9fa370e..fec19e4 100755 --- a/ipsilon/ipsilon +++ b/ipsilon/ipsilon @@ -19,7 +19,7 @@ import sys sys.stdout = sys.stderr - +import glob import os import atexit import cherrypy @@ -28,6 +28,19 @@ from ipsilon.util import page from ipsilon.root import Root from jinja2 import Environment, FileSystemLoader + +def nuke_session_locks(): + if cherrypy.config['tools.sessions.on']: + try: + sessdir = cherrypy.config['tools.sessions.storage_path'] + for l in glob.glob(os.path.join(sessdir, '*.lock')): + try: + os.remove(l) + except Exception: # pylint: disable=broad-except + pass + except Exception: # pylint: disable=broad-except + pass + cfgfile = None if (len(sys.argv) > 1): cfgfile = sys.argv[-1] @@ -40,6 +53,8 @@ else: cherrypy.config.update(cfgfile) +nuke_session_locks() + datastore = Store() admin_config = datastore.get_admin_config() for option in admin_config: |