Merge "Fix TypeError in function chunkify"

This commit is contained in:
Jenkins
2017-10-10 13:17:26 +00:00
committed by Gerrit Code Review

View File

@@ -87,6 +87,7 @@ class WeightPlanner(base.BasePlanner):
@staticmethod
def chunkify(lst, n):
"""Yield successive n-sized chunks from lst."""
n = int(n)
if n < 1:
# Just to make sure the number is valid
n = 1