From db9ab9b2629f00350a743a4eca72fb5ee8dc8c77 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 --- database/mysql/mysql_user.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/database/mysql/mysql_user.py b/database/mysql/mysql_user.py index afebd0a00c3..a3e24261c77 100644 --- a/database/mysql/mysql_user.py +++ b/database/mysql/mysql_user.py @@ -320,12 +320,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]])