mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:19:26 +08:00
up
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user