зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1603634 - change to integer division operator for both python versions r=aki
Changes: In `testing/mozharness/mozharness/base/parallel.py` the division operator is a single slash, which used to perform an integer division in python2 if both inputs were integers (which in this case is true). However in python3 the same operator now does float division. To preserve the behavior of the integer division that work on both platforms, a `//` is used. Differential Revision: https://phabricator.services.mozilla.com/D57069 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
670a57aa5b
Коммит
162fdecad9
|
@ -26,7 +26,7 @@ class ChunkingMixin(object):
|
|||
possible_list = possible_list[:]
|
||||
length = len(possible_list)
|
||||
for c in range(1, total_chunks + 1):
|
||||
n = length / total_chunks
|
||||
n = length // total_chunks
|
||||
# If the total number of items isn't evenly divisible by the
|
||||
# number of chunks, we need to append one more onto some chunks
|
||||
if c <= (length % total_chunks):
|
||||
|
|
Загрузка…
Ссылка в новой задаче