From: Ant Zucaro Date: Thu, 26 May 2011 17:05:39 +0000 (-0400) Subject: Change weapon stats view to build the weapon_stats array in a more pythonic way. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=97883cacc2293b8430f183991d6a8e2e7b96c8f0;p=xonotic%2Fxonstat.git Change weapon stats view to build the weapon_stats array in a more pythonic way. --- diff --git a/xonstat/views/player.py b/xonstat/views/player.py index 36e8b29..59fdce2 100755 --- a/xonstat/views/player.py +++ b/xonstat/views/player.py @@ -106,10 +106,8 @@ def player_weapon_stats(request): all() # turn this into something the accuracy template can use - weapon_stats = [] - for (pwstat, weapon) in pwstats: - weapon_stats.append((weapon.descr, pwstat.weapon_cd, pwstat.fired, - pwstat.hit, pwstat.max, pwstat.actual)) + weapon_stats = [(weapon.descr, pwstat.weapon_cd, pwstat.actual, + pwstat.max, pwstat.hit, pwstat.fired) for (pwstat, weapon) in pwstats] pgstat = DBSession.query(PlayerGameStat).\ filter_by(player_game_stat_id=pgstat_id).one()