From d16b221ee22f86cffbf676ab0122da1bf5da627e Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 15 Jul 2022 13:51:10 +0800 Subject: [PATCH] Update index.py --- plugins/mariadb/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index e00708b48..964519e2f 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -321,11 +321,11 @@ def initMysqlPwd(): cmd_pass = cmd_pass + "flush privileges;\"" data = mw.execShell(cmd_pass) - if data[1].find("ERROR"): + # print(data) + if data[1].find("ERROR") != -1: print("init mariadb password fail:" + data[1]) exit(1) - # print(data) pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) return True