From 0303e1e30c7746fee9c27180a9fb0a0065b14213 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 26 Nov 2013 00:06:45 +0100 Subject: Remove spaces in MySQL privileges strings. In order to allow strings of the form: priv="db.table1:SELECT, UPDATE,DELETE /db.table2:SELECT,INSERT, DELETE" --- lib/mysql_user | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/mysql_user b/lib/mysql_user index 602235a..64e1f3d 100644 --- a/lib/mysql_user +++ b/lib/mysql_user @@ -286,7 +286,7 @@ def privileges_unpack(priv): pieces[0][idx] = "`" + pieces[0][idx] + "`" pieces[0] = '.'.join(pieces[0]) - output[pieces[0]] = pieces[1].upper().split(',') + output[pieces[0]] = [ g.strip() for g in pieces[1].upper().split(',') ] if '*.*' not in output: output['*.*'] = ['USAGE'] -- cgit v1.2.3