Skip to content

Commit

Permalink
Ignore empty rows on csv
Browse files Browse the repository at this point in the history
  • Loading branch information
idanpa committed Jun 8, 2019
1 parent 2036c44 commit 9be7796
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions wpm/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,11 @@ def parse(row):
reader = csv.reader(file_obj)

for row in reader:
result = parse(row)
tag = result[-1]
games[tag].append(result[:-1])
current_tag = tag
if len(row) == 9:
result = parse(row)
tag = result[-1]
games[tag].append(result[:-1])
current_tag = tag

return Stats(current_tag, games)

Expand Down

0 comments on commit 9be7796

Please sign in to comment.