debug session stats
This commit is contained in:
parent
61f384a886
commit
5a0c83b60a
|
@ -467,11 +467,13 @@ class Database:
|
||||||
c.execute(self.sql.query[query], subs)
|
c.execute(self.sql.query[query], subs)
|
||||||
colnames = [desc[0] for desc in c.description]
|
colnames = [desc[0] for desc in c.description]
|
||||||
for row in c.fetchall():
|
for row in c.fetchall():
|
||||||
t_dict = {}
|
playerid = row[0]
|
||||||
for name, val in zip(colnames, row):
|
if (playerid == hero_id and h_hud_style != 'S') or (playerid != hero_id and hud_style != 'S'):
|
||||||
t_dict[name.lower()] = val
|
t_dict = {}
|
||||||
# print t_dict
|
for name, val in zip(colnames, row):
|
||||||
stat_dict[t_dict['player_id']] = t_dict
|
t_dict[name.lower()] = val
|
||||||
|
# print t_dict
|
||||||
|
stat_dict[t_dict['player_id']] = t_dict
|
||||||
|
|
||||||
return stat_dict
|
return stat_dict
|
||||||
|
|
||||||
|
@ -501,10 +503,10 @@ class Database:
|
||||||
|
|
||||||
row = c.fetchone()
|
row = c.fetchone()
|
||||||
if colnames[0].lower() == 'player_id':
|
if colnames[0].lower() == 'player_id':
|
||||||
playerid = row[0]
|
|
||||||
|
|
||||||
# Loop through stats adding them to appropriate stat_dict:
|
# Loop through stats adding them to appropriate stat_dict:
|
||||||
while row:
|
while row:
|
||||||
|
playerid = row[0]
|
||||||
if (playerid == hero_id and h_hud_style == 'S') or (playerid != hero_id and hud_style == 'S'):
|
if (playerid == hero_id and h_hud_style == 'S') or (playerid != hero_id and hud_style == 'S'):
|
||||||
for name, val in zip(colnames, row):
|
for name, val in zip(colnames, row):
|
||||||
if not playerid in stat_dict:
|
if not playerid in stat_dict:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user