def open(self): location = self.plugin.get("config", "location") (db_type, host, db_name, user, password) = location.split(':') self.conn = DatabaseConn() self.conn.connect(db_type, host, db_name, user, password)
def __init__(self, conf): self.conf = conf type = self.conf.get('output-db', 'type') host = self.conf.get('output-db', 'host') base = self.conf.get('output-db', 'base') user = self.conf.get('output-db', 'user') password = self.conf.get('output-db', 'pass') self.conn = DatabaseConn() self.conn.connect(type, host, base, user, password) self.activated = True