remove unused locked parameter and extraneous select

Resolves: fh#157
This commit is contained in:
Mike Bonnet 2009-11-09 22:26:29 -05:00
parent ebd75bf0de
commit d7858380e7

View file

@ -459,17 +459,13 @@ class Session(object):
c.execute(update, locals())
context.cnx.commit()
def createSession(self, user_id, hostip, authtype, master=None, locked=False):
def createSession(self, user_id, hostip, authtype, master=None):
"""Create a new session for the given user.
Return a map containing the session-id and session-key.
If master is specified, create a subsession
"""
c = context.cnx.cursor()
if not locked:
#acquire a row lock on the user entry
q = """SELECT id FROM users WHERE id=%(user_id)s"""
c.execute(q,locals())
# generate a random key
alnum = string.ascii_letters + string.digits