From: Ant Zucaro Date: Wed, 29 Jun 2011 01:27:20 +0000 (-0400) Subject: Avoid keyerror when rendering the scoreboard. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e4b334ae691472f684699a7d6013aabe420a6b26;p=xonotic%2Fxonstat.git Avoid keyerror when rendering the scoreboard. --- 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': - +
@@ -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