Mercurial > hg > ltpdarepo
changeset 71:543f68b3a8f0
Accept any iterable as 'privs' argument of the grant() function.
author | Daniele Nicolodi <daniele@grinta.net> |
---|---|
date | Mon, 15 Aug 2011 20:05:13 +0200 |
parents | e3ca8de73109 |
children | 90c1fa07f6a7 |
files | src/ltpdarepo/admin.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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')