Skip to content

Commit

Permalink
Fix stdout team scores
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturn committed Jan 14, 2019
1 parent e6e12d3 commit dfc3ba3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions soccer/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,15 @@ def live_scores(self, live_scores, use_12_hour_format):

def team_scores(self, team_scores, time, show_datetime, use_12_hour_format):
"""Prints the teams scores in a pretty format"""
for score in team_scores["fixtures"]:
import ipdb; ipdb.set_trace()
for score in team_scores["matches"]:
if score["status"] == "FINISHED":
click.secho("%s\t" % score["date"].split('T')[0],
click.secho("%s\t" % score["utcDate"].split('T')[0],
fg=self.colors.TIME, nl=False)
self.scores(self.parse_result(score))
elif show_datetime:
self.scores(self.parse_result(score), add_new_line=False)
click.secho(' %s' % Stdout.utc_to_local(score["date"],
click.secho(' %s' % Stdout.utc_to_local(score["utcDate"],
use_12_hour_format,
show_datetime),
fg=self.colors.TIME)
Expand Down

0 comments on commit dfc3ba3

Please sign in to comment.