From 89b42e2b83a086ede703ca3c7e58b0ccb53b46dd Mon Sep 17 00:00:00 2001 From: Laurent Indermuehle Date: Tue, 19 Sep 2023 11:26:46 +0200 Subject: [PATCH] fix sanity tests for Python 2.6 found in ansible-core 2.12 --- plugins/modules/mysql_info.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/modules/mysql_info.py b/plugins/modules/mysql_info.py index d07afb7..10f414b 100644 --- a/plugins/modules/mysql_info.py +++ b/plugins/modules/mysql_info.py @@ -552,7 +552,13 @@ class MySQL_Info(object): # and there is too many quotes. So we rewrite this. Also because we # wrap the db_table between single quotes, I use backticks to # indicate an empty string. - if set(priv) == {'PROXY', 'GRANT'} and user == 'root': + # + # TODO: when dropping support of ansible-core 2.12, change: + # set((x for x in priv)) + # into: + # set(priv) + # This is because the Sanity test for 2.12 uses Python 2.6!!! + if set((x for x in priv)) == {'PROXY', 'GRANT'} and user == 'root': priv_string.append("'``@`%`: 'PROXY,GRANT'") continue