mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Fixed #5501 -- Fixed Python 2.3 and 2.4 incompatibility. Thanks, brosner.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -31,11 +31,12 @@ class SessionStore(SessionBase): | ||||
|         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 @@ class SessionStore(SessionBase): | ||||
|             pass | ||||
|              | ||||
|     def clean(self): | ||||
|         pass | ||||
|         pass | ||||
|   | ||||
		Reference in New Issue
	
	Block a user