summaryrefslogtreecommitdiff
path: root/nova/conductor
diff options
context:
space:
mode:
authorTakashi Natsume <takanattie@gmail.com>2020-05-12 14:52:10 +0000
committerTakashi Natsume <takanattie@gmail.com>2020-11-07 03:25:02 +0000
commit1d0a0e8c2068c01366575bb989f15c2fd8962154 (patch)
tree00b00c39ff7782108ccaafb309fefa08ad9fd71f /nova/conductor
parent4ac4a04d1843b0450e8d6d80189ce3e85253dcd0 (diff)
downloadnova-1d0a0e8c2068c01366575bb989f15c2fd8962154.tar.gz
Remove six.moves
Replace the following items with Python 3 style code. - six.moves.configparser - six.moves.StringIO - six.moves.cStringIO - six.moves.urllib - six.moves.builtins - six.moves.range - six.moves.xmlrpc_client - six.moves.http_client - six.moves.http_cookies - six.moves.queue - six.moves.zip - six.moves.reload_module - six.StringIO - six.BytesIO Subsequent patches will replace other six usages. Change-Id: Ib2c406327fef2fb4868d8050fc476a7d17706e23 Implements: blueprint six-removal Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Diffstat (limited to 'nova/conductor')
-rw-r--r--nova/conductor/manager.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/nova/conductor/manager.py b/nova/conductor/manager.py
index aa79f8324e..cb5d2caa68 100644
--- a/nova/conductor/manager.py
+++ b/nova/conductor/manager.py
@@ -702,7 +702,7 @@ class ComputeTaskManager(base.Base):
return
elevated = context.elevated()
- for (instance, host_list) in six.moves.zip(instances, host_lists):
+ for (instance, host_list) in zip(instances, host_lists):
host = host_list.pop(0)
if is_reschedule:
# If this runs in the superconductor, the first instance will
@@ -1523,7 +1523,7 @@ class ComputeTaskManager(base.Base):
instances = []
host_az = {} # host=az cache to optimize multi-create
- for (build_request, request_spec, host_list) in six.moves.zip(
+ for (build_request, request_spec, host_list) in zip(
build_requests, request_specs, host_lists):
instance = build_request.get_new_instance(context)
# host_list is a list of one or more Selection objects, the first
@@ -1605,8 +1605,7 @@ class ComputeTaskManager(base.Base):
block_device_mapping, tags,
cell_mapping_cache)
- zipped = six.moves.zip(build_requests, request_specs, host_lists,
- instances)
+ zipped = zip(build_requests, request_specs, host_lists, instances)
for (build_request, request_spec, host_list, instance) in zipped:
if instance is None:
# Skip placeholders that were buried in cell0 or had their
@@ -1758,7 +1757,7 @@ class ComputeTaskManager(base.Base):
def _cleanup_build_artifacts(self, context, exc, instances, build_requests,
request_specs, block_device_mappings, tags,
cell_mapping_cache):
- for (instance, build_request, request_spec) in six.moves.zip(
+ for (instance, build_request, request_spec) in zip(
instances, build_requests, request_specs):
# Skip placeholders that were buried in cell0 or had their
# build requests deleted by the user before instance create.