Bugfix of 65525: proxysql in check_config TypeError: tuple indices must be integers, not str (#66850)
This commit is contained in:
parent
7ef7c1b5d7
commit
a86524b2bb
2 changed files with 8 additions and 0 deletions
|
@ -259,6 +259,10 @@ class ProxySQLServer(object):
|
|||
|
||||
cursor.execute(query_string, query_data)
|
||||
check_count = cursor.fetchone()
|
||||
|
||||
if isinstance(check_count, tuple):
|
||||
return int(check_count[0]) > 0
|
||||
|
||||
return (int(check_count['host_count']) > 0)
|
||||
|
||||
def get_server_config(self, cursor):
|
||||
|
|
|
@ -119,6 +119,10 @@ def check_config(variable, value, cursor):
|
|||
|
||||
cursor.execute(query_string, query_data)
|
||||
check_count = cursor.fetchone()
|
||||
|
||||
if isinstance(check_count, tuple):
|
||||
return int(check_count[0]) > 0
|
||||
|
||||
return (int(check_count['variable_count']) > 0)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue