Merge pull request #225 from slaveofmoney/patch-1

Removed double function declaration (get_uid)
This commit is contained in:
ahmedbodi 2014-02-12 15:42:09 +00:00
commit 6285aad778

View File

@ -342,19 +342,6 @@ class DB_Mysql():
} }
return ret return ret
def get_uid(self, id_or_username):
log.debug("Finding user id of %s", id_or_username)
uname = id_or_username.split(".", 1)[0]
self.execute("SELECT `id` FROM `accounts` where username = %s", (uname))
row = self.dbc.fetchone()
if row is None:
return False
else:
uid = row[0]
return uid
def insert_worker(self, account_id, username, password): def insert_worker(self, account_id, username, password):
log.debug("Adding new worker %s", username) log.debug("Adding new worker %s", username)
@ -363,8 +350,6 @@ class DB_Mysql():
self.dbh.commit() self.dbh.commit()
return str(username) return str(username)
def close(self): def close(self):
self.dbh.close() self.dbh.close()