use integer division instead of floating point division.

Fixes #13855
pull/4420/head
Toshio Kuratomi 2016-01-13 12:34:12 -08:00
parent 14f300f212
commit 4958180333
1 changed files with 32 additions and 32 deletions

View File

@ -243,7 +243,7 @@ class VaultEditor:
for _ in range(passes):
fh.seek(0, 0)
# get a random chunk of data, each pass with other length
chunk_len = random.randint(max_chunk_len/2, max_chunk_len)
chunk_len = random.randint(max_chunk_len//2, max_chunk_len)
data = os.urandom(chunk_len)
for _ in range(0, file_len // chunk_len):