cut newlines added by accident

This commit is contained in:
Laurent Indermuehle 2023-09-15 15:34:44 +02:00
parent 29b6ad89a1
commit 08b7842001
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09
2 changed files with 0 additions and 2 deletions

View file

@ -108,7 +108,6 @@ def get_tls_requires(cursor, user, host):
def get_grants(cursor, user, host):
cursor.execute("SHOW GRANTS FOR %s@%s", (user, host))
grants_line = list(filter(lambda x: "ON *.*" in x[0], cursor.fetchall()))[0]
pattern = r"(?<=\bGRANT\b)(.*?)(?=(?:\bON\b))"
grants = re.search(pattern, grants_line[0]).group().strip()
return grants.split(", ")