do not create a new session if nothing in session file

This commit is contained in:
mdipierro
2012-11-14 15:33:18 -06:00
parent 7319574f30
commit 651c92c175
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.2.1 (2012-11-14 14:59:57) stable
Version 2.2.1 (2012-11-14 15:33:12) stable
+2 -1
View File
@@ -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+')