check_solr_connection bug fix

If the ResponseHeader contains "zkConnected": false, your deployment will throw a "NameError: name 'false' is not defined" without this proposed line I added.
This commit is contained in:
Sam Mueller 2021-12-05 19:09:00 -05:00 committed by GitHub
parent 2957733f9d
commit 46ab021d9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -83,6 +83,7 @@ def check_solr_connection(retry=None):
conn_info = connection.read() conn_info = connection.read()
# SolrCloud # SolrCloud
conn_info = re.sub(r'"zkConnected":true', '"zkConnected":True', conn_info.decode('utf-8')) conn_info = re.sub(r'"zkConnected":true', '"zkConnected":True', conn_info.decode('utf-8'))
conn_info = re.sub(r'"zkConnected":false', '"zkConnected":False', conn_info.decode('utf-8'))
eval(conn_info) eval(conn_info)
def init_db(): def init_db():