Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Malcolm Tredinnick authored September 16, 2007

Showing 1 changed file with 7 additions and 6 deletions. Show diff stats Hide diff stats

  1. 13  django/contrib/sessions/backends/file.py
13  django/contrib/sessions/backends/file.py
@@ -31,11 +31,12 @@ def load(self):
31 31
         try:
32 32
             session_file = open(self._key_to_file(), "rb")
33 33
             try:
34  
-                session_data = self.decode(session_file.read())
35  
-            except(EOFError, SuspiciousOperation):
36  
-                self._session_key = self._get_new_session_key()
37  
-                self._session_cache = {}
38  
-                self.save()
  34
+                try:
  35
+                    session_data = self.decode(session_file.read())
  36
+                except(EOFError, SuspiciousOperation):
  37
+                    self._session_key = self._get_new_session_key()
  38
+                    self._session_cache = {}
  39
+                    self.save()
39 40
             finally:
40 41
                 session_file.close()
41 42
         except(IOError):
@@ -64,4 +65,4 @@ def delete(self, session_key):
64 65
             pass
65 66
             
66 67
     def clean(self):
67  
-        pass
  68
+        pass

0 notes on commit ae75958

Please sign in to comment.
Something went wrong with that request. Please try again.