Skip to content

Commit 9be7796

Browse files
committed
Ignore empty rows on csv
1 parent 2036c44 commit 9be7796

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

wpm/stats.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,11 @@ def parse(row):
224224
reader = csv.reader(file_obj)
225225

226226
for row in reader:
227-
result = parse(row)
228-
tag = result[-1]
229-
games[tag].append(result[:-1])
230-
current_tag = tag
227+
if len(row) == 9:
228+
result = parse(row)
229+
tag = result[-1]
230+
games[tag].append(result[:-1])
231+
current_tag = tag
231232

232233
return Stats(current_tag, games)
233234

0 commit comments

Comments
 (0)