Skip to content

Commit

Permalink
Fix csv team_players
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturn committed Jan 14, 2019
1 parent 7b4267e commit 46e6485
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions soccer/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,15 @@ def team_scores(self, team_scores, time):
def team_players(self, team):
"""Store output of team players to a CSV file"""
headers = ['Jersey Number', 'Name', 'Position', 'Nationality',
'Date of Birth', 'Market Value']
'Date of Birth']
result = [headers]

result.extend([player['shirtNumber'],
player['name'],
player['position'],
player['nationality'],
player['dateOfBirth'],
player['marketValue']]
for player in team['players'])
player['dateOfBirth']]
for player in team)
self.generate_output(result)

def standings(self, league_table, league):
Expand Down

0 comments on commit 46e6485

Please sign in to comment.