mysql_query, mysql_user: simple refactoring of type checks (#58)

* mysql_query: simple refactoring of query type check

* do the same for mysql_user

* Improve integration test coverage
This commit is contained in:
Andrew Klychkov 2020-11-06 13:12:07 +03:00 committed by GitHub
parent b2bde48020
commit 2dcbd7846f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 2 deletions

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):