Fix in redis_session.py select: prevent errors when value is integer/long

This commit is contained in:
gi0baro
2013-08-20 16:53:08 +02:00
parent 90931657e4
commit 05f3e01ece

View File

@@ -168,7 +168,7 @@ class MockQuery(object):
def select(self):
if self.op == 'eq' and self.field == 'id' and self.value:
#means that someone wants to retrieve the key self.value
key = self.keyprefix + ':' + self.value
key = self.keyprefix + ':' + str(self.value)
if self.with_lock:
acquire_lock(self.db, key + ':lock', self.value)
rtn = self.db.hgetall(key)