From cf29039b4b6632de8ded060c8982d92270fb6f9b Mon Sep 17 00:00:00 2001 From: antzucaro Date: Sat, 28 Apr 2012 08:30:30 -0400 Subject: [PATCH] Don't throw an error if the number of duel ranks found is < 10. I was using '-' as a filler in such cases, and was populating four values into a tuple. The template expected three, so in situations when I had to fall back on the filler values, I was providing one too many, leading to 'too many values to unpack' upon loading up the main page. --- xonstat/views/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xonstat/views/main.py b/xonstat/views/main.py index ae67aa1..51624d5 100755 --- a/xonstat/views/main.py +++ b/xonstat/views/main.py @@ -29,7 +29,7 @@ def main_index(request): for (player_id, nick, elo) in duel_ranks] for i in range(leaderboard_count-len(duel_ranks)): - duel_ranks.append(('-', '-', '-', '-')) + duel_ranks.append(('-', '-', '-')) # top ranked CTF-ers ctf_ranks = DBSession.query(PlayerRank.player_id, PlayerRank.nick, -- 2.39.2