mirror of
https://github.com/ansible/awx.git
synced 2026-02-13 09:27:13 -03:30
convert py2 -> py3
This commit is contained in:
@@ -147,14 +147,14 @@ def spread(n, m):
|
||||
ret = []
|
||||
# At least one in each slot, split up the rest exponentially so the first
|
||||
# buckets contain a lot of entries
|
||||
for i in xrange(m):
|
||||
for i in range(m):
|
||||
if n > 0:
|
||||
ret.append(1)
|
||||
n -= 1
|
||||
else:
|
||||
ret.append(0)
|
||||
|
||||
for i in xrange(m):
|
||||
for i in range(m):
|
||||
n_in_this_slot = n // 2
|
||||
n-= n_in_this_slot
|
||||
ret[i] += n_in_this_slot
|
||||
@@ -239,7 +239,7 @@ def make_the_data():
|
||||
|
||||
|
||||
print('# Creating %d organizations' % n_organizations)
|
||||
for i in xrange(n_organizations):
|
||||
for i in range(n_organizations):
|
||||
sys.stdout.write('\r%d ' % (i + 1))
|
||||
sys.stdout.flush()
|
||||
org, _ = Organization.objects.get_or_create(name='%s Organization %d' % (prefix, i))
|
||||
|
||||
Reference in New Issue
Block a user