do the same for mysql_user

This commit is contained in:
Andrew Klychkov 2020-11-06 10:39:54 +03:00
parent ef8a4700b7
commit 6ef2a60309
2 changed files with 2 additions and 1 deletions
changelogs/fragments
plugins/modules

View file

@ -1,2 +1,3 @@
minor_changes:
- mysql_query - simple refactoring of query type check (https://github.com/ansible-collections/community.mysql/pull/58).
- mysql_user - simple refactoring of priv type check (https://github.com/ansible-collections/community.mysql/pull/58).

View file

@ -1044,7 +1044,7 @@ def main():
plugin_hash_string = module.params["plugin_hash_string"]
plugin_auth_string = module.params["plugin_auth_string"]
resource_limits = module.params["resource_limits"]
if priv and not (isinstance(priv, str) or isinstance(priv, dict)):
if priv and not isinstance(priv, (str, dict)):
module.fail_json(msg="priv parameter must be str or dict but %s was passed" % type(priv))
if priv and isinstance(priv, dict):