From 8ee6f9d1904835ad718df500812f49df74522ef8 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 2 Feb 2021 21:30:48 +0800 Subject: [PATCH] up --- plugins/mysql/class/mysql.py | 3 +++ plugins/mysql/index.py | 1 + 2 files changed, 4 insertions(+) diff --git a/plugins/mysql/class/mysql.py b/plugins/mysql/class/mysql.py index 4b4b8e3da..9f607ee0c 100755 --- a/plugins/mysql/class/mysql.py +++ b/plugins/mysql/class/mysql.py @@ -48,6 +48,9 @@ class mysql: self.__DB_ERR = e return False + def setDbConf(self, conf): + self.__DB_CNF = conf + def setPwd(self, pwd): self.__DB_PASS = pwd diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index b51e0819f..1c96480cb 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -100,6 +100,7 @@ def pSqliteDb(dbname='databases'): def pMysqlDb(): db = mysql.mysql() db.__DB_CNF = getConf() + db.setDbConf(getConf()) db.setPwd(pSqliteDb('config').where( 'id=?', (1,)).getField('mysql_root')) return db