From 0af631499a1e02cca02f12b84d795571e3704f3a Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 29 May 2015 18:55:32 -0700 Subject: [PATCH] Use a list comprehension instead of map and lambda --- lib/ansible/modules/database/mysql/mysql_user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/database/mysql/mysql_user.py b/lib/ansible/modules/database/mysql/mysql_user.py index 6ba7db92a06..972188f4aac 100644 --- a/lib/ansible/modules/database/mysql/mysql_user.py +++ b/lib/ansible/modules/database/mysql/mysql_user.py @@ -320,7 +320,7 @@ def privileges_unpack(priv): dbpriv = pieces[0].rsplit(".", 1) pieces[0] = "`%s`.%s" % (dbpriv[0].strip('`'), dbpriv[1]) - output[pieces[0]] = map(lambda s: s.strip(), pieces[1].upper().split(',')) + output[pieces[0]] = [s.strip() for s in pieces[1].upper().split(',')] new_privs = frozenset(output[pieces[0]]) if not new_privs.issubset(VALID_PRIVS): raise InvalidPrivsError('Invalid privileges specified: %s' % new_privs.difference(VALID_PRIVS))