From 651c92c1757eceb26eb74bbc90d7c6e7af0f82c5 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 14 Nov 2012 15:33:18 -0600 Subject: [PATCH] do not create a new session if nothing in session file --- VERSION | 2 +- gluon/globals.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index c20329d0..9bb1aa4d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.2.1 (2012-11-14 14:59:57) stable +Version 2.2.1 (2012-11-14 15:33:12) stable diff --git a/gluon/globals.py b/gluon/globals.py index 60cc86a6..e274d74a 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -554,7 +554,8 @@ class Session(Storage): else: response.session_id = None # do not try load the data from file is these was data in cookie - if response.session_id and not session_cookie_data: + if response.session_id and not session_cookie_data and \ + os.path.exists(response.session_filename): try: response.session_file = \ open(response.session_filename, 'rb+')