From c50012b9b5309262f18bad71e58a128889e411c8 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 1 Jan 2023 17:17:05 +0800 Subject: [PATCH] Update index.py --- plugins/mysql/index.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index 9f51e0456..864cdb121 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -2331,16 +2331,17 @@ def getSlaveList(version=''): tmp['Last_SQL_Error'] = dlist[x]["Last_SQL_Error"] tmp['Slave_SQL_Running_State'] = dlist[x]["Slave_SQL_Running_State"] - if tmp['Last_Error'] != "": + tmp['Error'] = '' + if tmp['Last_Error'] != '': tmp['Error'] = tmp['Last_Error'] - if tmp['Last_IO_Error'] != "": + if tmp['Last_IO_Error'] != '': tmp['Error'] = tmp['Last_IO_Error'] - if tmp['Last_SQL_Error'] != "": + if tmp['Last_SQL_Error'] != '': tmp['Error'] = tmp['Last_SQL_Error'] - if tmp['Error'] == "": + if tmp['Error'] == '': tmp['Error'] = tmp['Slave_SQL_Running_State'] ret.append(tmp)