Skip to content

Commit

Permalink
Fix check on team_flag, fixes #57
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbowler committed Jan 30, 2018
1 parent 8ec26a0 commit 6a11125
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions mlbgame/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ def __player_stats_info(data, name):
for i in x.attrib:
stats[i] = x.attrib[i]
# apply to correct list
if y.attrib['team_flag'] == 'home':
home.append(stats)
elif not home:
away.append(stats)
home.append(stats) if y.attrib['team_flag'] == 'home' else away.append(stats)
return (home, away)

def __raw_player_stats_info(data):
Expand Down

0 comments on commit 6a11125

Please sign in to comment.