fix missing variable

This commit is contained in:
Ricardo Pedroso
2013-05-13 21:29:37 +01:00
parent 1a3361a1bb
commit 44c13f9fa3

View File

@@ -186,7 +186,8 @@ class MockQuery(object):
def update(self, **kwargs):
#means that the session has been found and needs an update
if self.op == 'eq' and self.field == 'id' and self.value:
rtn = self.db.hmset("%s:%s" % (self.keyprefix, self.value), kwargs)
key = "%s:%s" % (self.keyprefix, self.value)
rtn = self.db.hmset(key, kwargs)
if self.session_expiry:
self.db.expire(key, self.session.expiry)
return rtn