summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Belu <cbelu@cloudbasesolutions.com>2015-10-22 05:30:42 +0300
committerClaudiu Belu <cbelu@cloudbasesolutions.com>2015-12-07 10:21:00 +0000
commitc4581f207c32f3d9773f49dd664a818f322a07cc (patch)
tree4a4fb5b73d1558be155f18709af166ea76338507
parentdb9b47a0c7fc0e470e82f841aca3d54f2a1cae1b (diff)
downloadnova-c4581f207c32f3d9773f49dd664a818f322a07cc.tar.gz
Replaces izip_longest with six.moves.zip_longest
itertools.izip_longest does not exist in Python 3. Partially implements blueprint: nova-python3-mitaka Change-Id: I6322fe8a4b186cefa69acc289bf9ffada0ca3874
-rw-r--r--nova/network/manager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/network/manager.py b/nova/network/manager.py
index 5931864e9c..51576afa48 100644
--- a/nova/network/manager.py
+++ b/nova/network/manager.py
@@ -27,7 +27,6 @@ topologies. All of the network commands are issued to a subclass of
import collections
import datetime
import functools
-import itertools
import math
import re
import uuid
@@ -43,6 +42,7 @@ from oslo_utils import netutils
from oslo_utils import strutils
from oslo_utils import timeutils
from oslo_utils import uuidutils
+import six
from nova import context
from nova import exception
@@ -1358,7 +1358,7 @@ class NetworkManager(manager.Manager):
self._validate_cidr(context, nets, subnets_v4, fixed_net_v4)
networks = objects.NetworkList(context=context, objects=[])
- subnets = itertools.izip_longest(subnets_v4, subnets_v6)
+ subnets = six.moves.zip_longest(subnets_v4, subnets_v6)
for index, (subnet_v4, subnet_v6) in enumerate(subnets):
net = objects.Network(context=context)
uuid = kwargs.get('uuid')