From 5f3f30f1927ec5c22d4133638c1e90931655206f Mon Sep 17 00:00:00 2001 From: RhinosF1 Date: Sat, 18 May 2024 12:49:58 +0100 Subject: [PATCH] Update utils.py --- miraheze/salt/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miraheze/salt/utils.py b/miraheze/salt/utils.py index 6e6bc4b..45170b3 100644 --- a/miraheze/salt/utils.py +++ b/miraheze/salt/utils.py @@ -39,9 +39,9 @@ def execute_salt_command(salt_command: str, shell: bool = True, stdout: Optional def get_db_cluster(wiki: str) -> str: - db_query = f'SELECT wiki_dbcluster FROM mhglobal.cw_wikis WHERE wiki_dbname = \\"{wiki}\\"' + db_query = f"SELECT wiki_dbcluster FROM mhglobal.cw_wikis WHERE wiki_dbname = '{wiki}'" command = generate_salt_command('db171', f"sudo -i mysql --skip-column-names -e '{db_query}'") - result = execute_salt_command(salt_command=command, stdout=subprocess.PIPE, text=True) + result = execute_salt_command(salt_command=commandd, stdout=subprocess.PIPE, text=True) if result: cluster_name = result.stdout.strip() cluster_data = cluster_name.split('\n')