Merge "Convert xrange to range"

This commit is contained in:
Jenkins
2013-12-01 03:44:20 +00:00
committed by Gerrit Code Review
4 changed files with 4 additions and 4 deletions

View File

@@ -72,7 +72,7 @@ class ListNetwork(neutronV20.ListCommand):
uri_len_exc.excess)
chunk_size = max_size / self.subnet_id_filter_len
subnets = []
for i in xrange(0, subnet_count, chunk_size):
for i in range(0, subnet_count, chunk_size):
subnets.extend(
_get_subnet_list(subnet_ids[i: i + chunk_size]))

View File

@@ -207,7 +207,7 @@ class CLITestV20Base(testtools.TestCase):
body[resource].update(extra_body)
body[resource].update(kwargs)
for i in xrange(len(position_names)):
for i in range(len(position_names)):
body[resource].update({position_names[i]: position_values[i]})
ress = {resource:
{self.id_field: myid}, }

View File

@@ -147,7 +147,7 @@ class ToPrimitiveTestCase(testtools.TestCase):
'1920-02-03 04:05:06.000007')
def test_iter(self):
x = xrange(1, 6)
x = range(1, 6)
self.assertEqual(utils.to_primitive(x), [1, 2, 3, 4, 5])
def test_iteritems(self):

View File

@@ -1216,7 +1216,7 @@ class Client(object):
:raises: ConnectionFailed if the maximum # of retries is exceeded
"""
max_attempts = self.retries + 1
for i in xrange(max_attempts):
for i in range(max_attempts):
try:
return self.do_request(method, action, body=body,
headers=headers, params=params)