From 7ab2ddbe2af1d685c44dc36e87ef7f05efc5de35 Mon Sep 17 00:00:00 2001 From: Jonathan Mainguy Date: Mon, 18 May 2015 21:53:20 -0400 Subject: [PATCH] escapeds changes fixed merge conflict remove uneeded regexs arrays --- lib/ansible/modules/database/mysql/mysql_user.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/database/mysql/mysql_user.py b/lib/ansible/modules/database/mysql/mysql_user.py index 7971c0ff337..ff09e2d740c 100644 --- a/lib/ansible/modules/database/mysql/mysql_user.py +++ b/lib/ansible/modules/database/mysql/mysql_user.py @@ -317,12 +317,8 @@ def privileges_unpack(priv): output = {} for item in priv.strip().split('/'): pieces = item.strip().split(':') - if '.' in pieces[0]: - pieces[0] = pieces[0].split('.') - for idx, piece in enumerate(pieces): - if pieces[0][idx] != "*": - pieces[0][idx] = "`" + pieces[0][idx] + "`" - pieces[0] = '.'.join(pieces[0]) + dbpriv = pieces[0].rsplit(".", 1) + pieces[0] = "`%s`.%s" % (dbpriv[0].strip('`'), dbpriv[1]) output[pieces[0]] = pieces[1].upper().split(',') new_privs = frozenset(output[pieces[0]])