Author: jezdez
Date: 2012-03-23 02:32:11 -0700 (Fri, 23 Mar 2012)
New Revision: 17796
Modified:
django/trunk/django/contrib/sessions/backends/cache.py
django/trunk/django/contrib/sessions/backends/cached_db.py
Log:
Fixed an incompatibility with Python 2.5 in the changes done in r17795. Refs
#17810.
Modified: django/trunk/django/contrib/sessions/backends/cache.py
===================================================================
--- django/trunk/django/contrib/sessions/backends/cache.py 2012-03-23
05:31:11 UTC (rev 17795)
+++ django/trunk/django/contrib/sessions/backends/cache.py 2012-03-23
09:32:11 UTC (rev 17796)
@@ -3,6 +3,7 @@
KEY_PREFIX = "django.contrib.sessions.cache"
+
class SessionStore(SessionBase):
"""
A cache-based session store.
@@ -18,7 +19,7 @@
def load(self):
try:
session_data = self._cache.get(self.cache_key, None)
- except Exception as e:
+ except Exception, e:
e_type = str(type(e))
if e_type != "<class 'memcache.MemcachedKeyLengthError'>":
raise e
Modified: django/trunk/django/contrib/sessions/backends/cached_db.py
===================================================================
--- django/trunk/django/contrib/sessions/backends/cached_db.py 2012-03-23
05:31:11 UTC (rev 17795)
+++ django/trunk/django/contrib/sessions/backends/cached_db.py 2012-03-23
09:32:11 UTC (rev 17796)
@@ -8,6 +8,7 @@
KEY_PREFIX = "django.contrib.sessions.cached_db"
+
class SessionStore(DBStore):
"""
Implements cached, database backed sessions.
@@ -23,7 +24,7 @@
def load(self):
try:
data = cache.get(self.cache_key, None)
- except Exception as e:
+ except Exception, e:
e_type = str(type(e))
if e_type != "<class 'memcache.MemcachedKeyLengthError'>":
raise e
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.