Merge "Fix TypeError in function chunkify"
This commit is contained in:
@@ -87,6 +87,7 @@ class WeightPlanner(base.BasePlanner):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def chunkify(lst, n):
|
def chunkify(lst, n):
|
||||||
"""Yield successive n-sized chunks from lst."""
|
"""Yield successive n-sized chunks from lst."""
|
||||||
|
n = int(n)
|
||||||
if n < 1:
|
if n < 1:
|
||||||
# Just to make sure the number is valid
|
# Just to make sure the number is valid
|
||||||
n = 1
|
n = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user