mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-19 00:41:31 -07:00
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:
parent
b2bde48020
commit
2dcbd7846f
4 changed files with 24 additions and 2 deletions
|
@ -149,7 +149,7 @@ def main():
|
|||
config_file = module.params['config_file']
|
||||
query = module.params["query"]
|
||||
|
||||
if not isinstance(query, str) and not isinstance(query, list):
|
||||
if not isinstance(query, (str, list)):
|
||||
module.fail_json(msg="the query option value must be a string or list, passed %s" % type(query))
|
||||
|
||||
if isinstance(query, str):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue