Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed an incompatibility with Python 2.5 in the changes done in r1779…

…5. Refs #17810.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17796 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 46871eb1bb37e0c34f4498e671f6418f9487d69f 1 parent 2ca9801
@jezdez jezdez authored
View
3  django/contrib/sessions/backends/cache.py
@@ -3,6 +3,7 @@
KEY_PREFIX = "django.contrib.sessions.cache"
+
class SessionStore(SessionBase):
"""
A cache-based session store.
@@ -18,7 +19,7 @@ def cache_key(self):
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
View
3  django/contrib/sessions/backends/cached_db.py
@@ -8,6 +8,7 @@
KEY_PREFIX = "django.contrib.sessions.cached_db"
+
class SessionStore(DBStore):
"""
Implements cached, database backed sessions.
@@ -23,7 +24,7 @@ def cache_key(self):
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
Please sign in to comment.
Something went wrong with that request. Please try again.