mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-08 19:50:31 -07:00
fix case when fetch return a tuple instead of a dict
This commit is contained in:
parent
319b7e86f3
commit
77c7beb514
1 changed files with 2 additions and 1 deletions
|
@ -487,7 +487,8 @@ def privileges_get(module, cursor, user, host, maria_role=False):
|
||||||
return x
|
return x
|
||||||
|
|
||||||
for grant in grants:
|
for grant in grants:
|
||||||
grant = list(grant.values())
|
if isinstance(grant, dict):
|
||||||
|
grant = list(grant.values())
|
||||||
|
|
||||||
if not maria_role:
|
if not maria_role:
|
||||||
res = re.match("""GRANT (.+) ON (.+) TO (['`"]).*\\3@(['`"]).*\\4( IDENTIFIED BY PASSWORD (['`"]).+\\6)? ?(.*)""", grant[0])
|
res = re.match("""GRANT (.+) ON (.+) TO (['`"]).*\\3@(['`"]).*\\4( IDENTIFIED BY PASSWORD (['`"]).+\\6)? ?(.*)""", grant[0])
|
||||||
|
|
Loading…
Add table
Reference in a new issue