1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

use integer division instead of floating point division.

Fixes #13855
This commit is contained in:
Toshio Kuratomi 2016-01-13 12:34:12 -08:00
parent 14f300f212
commit 4958180333

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):