# HG changeset patch # User Daniele Nicolodi # Date 1313431513 -7200 # Node ID 543f68b3a8f08417f612385430cc4e913db3a247 # Parent e3ca8de73109eaad58c168cb04b96ebfc1486b88 Accept any iterable as 'privs' argument of the grant() function. diff -r e3ca8de73109 -r 543f68b3a8f0 src/ltpdarepo/admin.py --- a/src/ltpdarepo/admin.py Sun Aug 14 19:31:28 2011 +0200 +++ b/src/ltpdarepo/admin.py Mon Aug 15 20:05:13 2011 +0200 @@ -138,6 +138,7 @@ conn = mysql.connect(host=HOSTNAME, db=DATABASE, user=USERNAME, passwd=PASSWORD, charset='utf8') curs = conn.cursor() + privs = list(privs) if 'admin' in privs: curs.execute('''UPDATE users SET is_admin=1 WHERE username=%s''', username) privs.remove('admin')