From e4b334ae691472f684699a7d6013aabe420a6b26 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Tue, 28 Jun 2011 21:27:20 -0400 Subject: [PATCH] Avoid keyerror when rendering the scoreboard. --- xonstat/templates/scoreboard.mako | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/xonstat/templates/scoreboard.mako b/xonstat/templates/scoreboard.mako index b62ba06..ec3a20c 100755 --- a/xonstat/templates/scoreboard.mako +++ b/xonstat/templates/scoreboard.mako @@ -1,8 +1,6 @@ <%def name="scoreboard(game_type_cd, pgstats)"> - -${scoreboard_header(game_type_cd)} - +${scoreboard_header(game_type_cd, pgstats[0])} % for pgstat in pgstats: @@ -44,7 +42,7 @@ ${scoreboard_header(game_type_cd)} % endif % if game_type_cd == 'ctf': - + @@ -57,7 +55,7 @@ ${scoreboard_header(game_type_cd)} % endif % if game_type_cd == 'ca': - + @@ -66,7 +64,7 @@ ${scoreboard_header(game_type_cd)} % endif % if game_type_cd == 'freezetag': - + -- 2.39.2
@@ -31,7 +29,7 @@ ${scoreboard_header(game_type_cd)} ##### SCOREBOARD HEADER ##### -<%def name="scoreboard_header(game_type_cd)"> +<%def name="scoreboard_header(game_type_cd, pgstat)"> % if game_type_cd == 'dm' or game_type_cd == 'tdm':
Nick
Nick Kills Captures
Nick Kills Score
Nick Kills Deaths