Use floor division (//) when calculating chunks in python

Also remove int() casting from captcha-old.py which was added
in 66152162fe but diverges from
captcha.py

Most of the code should be the same in these two files should
be the same bar the actual image processing...

Bug: T263223
Follows-Up: If4f6bc9048aceacc41538c001255425e848fd8e9
Change-Id: I3062e64fc380022ca9fee793bc522f212eb873d3
This commit is contained in:
Reedy 2020-09-18 17:59:29 +01:00
parent ac1031e260
commit 907e209c90
2 changed files with 2 additions and 3 deletions

View file

@ -270,7 +270,7 @@ if __name__ == '__main__':
chunks = 1
threads = 1
else:
chunks = int(count / threads)
chunks = (count // threads)
p = multiprocessing.Pool(threads);
data = []
@ -279,4 +279,3 @@ if __name__ == '__main__':
data.append([chunks, words, blacklist, opts, font, fontsize])
p.map(run_in_thread, data)

View file

@ -287,7 +287,7 @@ if __name__ == '__main__':
chunks = 1
threads = 1
else:
chunks = (count / threads)
chunks = (count // threads)
p = multiprocessing.Pool(threads);
data = []