Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #5501 -- Fixed Python 2.3 and 2.4 incompatibility. Thanks, bros…

…ner.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ae75958820e344357ea716fcdbd5e56f06a00b24 1 parent d0f4e52
@malcolmt malcolmt authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 django/contrib/sessions/backends/file.py
View
13 django/contrib/sessions/backends/file.py
@@ -31,11 +31,12 @@ def load(self):
try:
session_file = open(self._key_to_file(), "rb")
try:
- session_data = self.decode(session_file.read())
- except(EOFError, SuspiciousOperation):
- self._session_key = self._get_new_session_key()
- self._session_cache = {}
- self.save()
+ try:
+ session_data = self.decode(session_file.read())
+ except(EOFError, SuspiciousOperation):
+ self._session_key = self._get_new_session_key()
+ self._session_cache = {}
+ self.save()
finally:
session_file.close()
except(IOError):
@@ -64,4 +65,4 @@ def delete(self, session_key):
pass
def clean(self):
- pass
+ pass
Please sign in to comment.
Something went wrong with that request. Please try again.