mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-14 18:11:45 -07:00
Changed code layout as suggested by flake8
This commit is contained in:
parent
b895692181
commit
8fe42e74b6
2 changed files with 7 additions and 2 deletions
|
@ -30,9 +30,11 @@ from ansible_collections.community.mysql.plugins.module_utils.implementations.my
|
|||
class InvalidPrivsError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
diff_current = {}
|
||||
diff_new = {}
|
||||
|
||||
|
||||
def get_mode(cursor):
|
||||
cursor.execute('SELECT @@sql_mode')
|
||||
result = cursor.fetchone()
|
||||
|
@ -634,7 +636,9 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
|
|||
cursor.execute(*query_with_args)
|
||||
changed = True
|
||||
|
||||
return {'changed': changed, 'msg': msg, 'password_changed': password_changed, 'attributes': final_attributes, 'diff_current': diff_current, 'diff_new': diff_new}
|
||||
return {'changed': changed, 'msg': msg, 'password_changed': password_changed, 'attributes': final_attributes,
|
||||
'diff_current': diff_current, 'diff_new': diff_new}
|
||||
|
||||
|
||||
def user_delete(cursor, user, host, host_all, check_mode):
|
||||
diff_new['state'] = "absent"
|
||||
|
|
|
@ -650,7 +650,8 @@ def main():
|
|||
else:
|
||||
changed = False
|
||||
msg = "User doesn't exist"
|
||||
module.exit_json(changed=changed, diff={'before': diff_current, 'after': diff_new}, user=user, msg=msg, password_changed=password_changed, attributes=final_attributes)
|
||||
module.exit_json(changed=changed, diff={'before': diff_current, 'after': diff_new}, user=user, msg=msg,
|
||||
password_changed=password_changed, attributes=final_attributes)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue