mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
pep8 fixes
This commit is contained in:
parent
27e518a0b1
commit
c0747b7baa
12 changed files with 60 additions and 56 deletions
|
@ -176,7 +176,7 @@ def privileges_get(cursor, user,host):
|
|||
privileges = res.group(1).split(", ")
|
||||
privileges = ['ALL' if x=='ALL PRIVILEGES' else x for x in privileges]
|
||||
if "WITH GRANT OPTION" in res.group(4):
|
||||
privileges.append('GRANT')
|
||||
privileges.append('GRANT')
|
||||
db = res.group(2).replace('`', '')
|
||||
output[db] = privileges
|
||||
return output
|
||||
|
@ -213,8 +213,7 @@ def privileges_grant(cursor, user,host,db_table,priv):
|
|||
priv_string = ",".join(filter(lambda x: x != 'GRANT', priv))
|
||||
query = "GRANT %s ON %s TO '%s'@'%s'" % (priv_string,db_table,user,host)
|
||||
if 'GRANT' in priv:
|
||||
query = query + " WITH GRANT OPTION"
|
||||
|
||||
query = query + " WITH GRANT OPTION"
|
||||
cursor.execute(query)
|
||||
|
||||
def load_mycnf():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue