def __init__(self):
    self.conn = None
    self.db = None
    self.db = MySQLdb.connect(user=DB_USER, passwd=DB_PASS, db=DB_NAME, host=DB_HOST, port=DB_PORT)
    if (self.db == None):
        raise Exception('DBLogger: Unable to connect to database.')
    self.conn = self.db.cursor()
def __init__(self):
    self.conn = None
    self.db = None
    self.db = MySQLdb.connect(user=DB_USER, passwd=DB_PASS, db=DB_NAME, host=DB_HOST, port=DB_PORT)
    if (self.db == None):
        raise Exception('DBLogger: Unable to connect to database.')
    self.conn = self.db.cursor()