fix integer division for Py3

This commit is contained in:
root 2015-12-05 12:31:58 +00:00
parent 480a30e922
commit 6eaea9aa6e

View File

@ -107,8 +107,8 @@ class Stream(object):
izip_longest = itertools.izip_longest
for index, start, end in izip_longest(range(shard_count),
range(0,2**128,2**128/shard_count),
range(2**128/shard_count,2**128,2**128/shard_count),
range(0,2**128,2**128//shard_count),
range(2**128//shard_count,2**128,2**128//shard_count),
fillvalue=2**128):
shard = Shard(index, start, end)
self.shards[shard.shard_id] = shard