Skip to content

Commit

Permalink
Fix Python 3.7 compatibility issue
Browse files Browse the repository at this point in the history
Catch StopIteration when grouping records with padding
  • Loading branch information
cynddl committed May 18, 2020
1 parent fe97be9 commit d02ffe8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bandicoot/helper/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ def group_records_with_padding(records, groupby='week'):

yield chunk

pointer = next(_range)
try:
pointer = next(_range)
except StopIteration as e:
pass


def group_records(records, groupby='week'):
Expand Down

0 comments on commit d02ffe8

Please sign in to comment.