Skip to content

Commit 491e552

Browse files
author
Youri Wijnands
authored
Update row_processor.py (#11)
1 parent b77bfbc commit 491e552

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

row_processor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,7 @@ def batch(iterable, size):
3232
sourceiter = iter(iterable)
3333
while True:
3434
batchiter = islice(sourceiter, size)
35-
yield chain([six.next(batchiter)], batchiter)
36-
35+
try:
36+
yield chain([six.next(batchiter)], batchiter)
37+
except StopIteration:
38+
return

0 commit comments

Comments
 (0)