diff --git a/lib/nntp/tiny/user.py b/lib/nntp/tiny/user.py index e626be2..e03f206 100644 --- a/lib/nntp/tiny/user.py +++ b/lib/nntp/tiny/user.py @@ -41,9 +41,14 @@ class User(DatabaseTable): and user_perm.user_id = ? """ - cr = db.execute(sql, self.id) + cr = db.execute(sql, (self.id,)) + + while True: + row = cr.fetchone() + + if row is None: + break - for row in cr.each(): perms |= UserPermission[row[0]] return perms