mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-28 01:50:18 +00:00
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:
parent
ac1031e260
commit
907e209c90
|
@ -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)
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ if __name__ == '__main__':
|
|||
chunks = 1
|
||||
threads = 1
|
||||
else:
|
||||
chunks = (count / threads)
|
||||
chunks = (count // threads)
|
||||
|
||||
p = multiprocessing.Pool(threads);
|
||||
data = []
|
||||
|
|
Loading…
Reference in a new issue