diff --git a/plugins/module_utils/user.py b/plugins/module_utils/user.py index 366af56b4..0b37f3652 100644 --- a/plugins/module_utils/user.py +++ b/plugins/module_utils/user.py @@ -533,8 +533,8 @@ def pick(x): raise InvalidPrivsError('unable to parse the MySQL grant string: %s' % grant[0]) - privileges = [x.strip() for x in res.group(1).split(",")] - privileges = [pick(x) for x in privileges] + privileges = res.group(1).split(",") + privileges = [pick(x.strip()) for x in privileges] # Handle cases when there's privs like GRANT SELECT (colA, ...) in privs. # To this point, the privileges list can look like diff --git a/tests/sanity/ignore-2.15.txt b/tests/sanity/ignore-2.15.txt index 5565108eb..da0354c97 100644 --- a/tests/sanity/ignore-2.15.txt +++ b/tests/sanity/ignore-2.15.txt @@ -6,4 +6,5 @@ plugins/modules/mysql_info.py validate-modules:parameter-list-no-elements plugins/modules/mysql_query.py validate-modules:parameter-list-no-elements plugins/modules/mysql_user.py validate-modules:undocumented-parameter plugins/modules/mysql_variables.py validate-modules:doc-required-mismatch +plugins/module_utils/mysql.py pylint:unused-import plugins/module_utils/version.py pylint:unused-import