Esempio n. 1
0
    def __init__(self):
        config = ConfigManager()

        server = config.get_db_server()
        user = config.get_db_user()
        password = config.get_db_pass()
        db = config.get_host_db_name()
        table = config.get_host_db_table()

        try:
            self.con = mdb.connect(server, user, password, db)
            self.table = table;
        except mdb.Error, e:
            print "Error %d: %s" % (e.args[0],e.args[1])
            return None