Use six.move.xrange to replace xrange
in python3.x, there is no method named xrange(), it has been replaced by range(),which is equal to xrange() in python2.x. so we must fix this issue. we use six module to fix this issue. Change-Id: Ia901798cf16b9a48982e6845fa3e5deffc3bd509 Closes-Bug: #1268439
This commit is contained in:
parent
4a8cae5e28
commit
59b976fc7b
@ -19,6 +19,8 @@ each comprise 12 (lower-case) alphanumeric characters.
|
|||||||
import base64
|
import base64
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
from six.moves import xrange
|
||||||
|
|
||||||
|
|
||||||
def _to_byte_string(value, num_bits):
|
def _to_byte_string(value, num_bits):
|
||||||
'''
|
'''
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
import collections
|
import collections
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
|
from six.moves import xrange
|
||||||
|
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
|
||||||
from heat.openstack.common.gettextutils import _
|
from heat.openstack.common.gettextutils import _
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
|
||||||
|
from six.moves import xrange
|
||||||
|
|
||||||
from heat.db import api as db_api
|
from heat.db import api as db_api
|
||||||
from heat.engine import constraints
|
from heat.engine import constraints
|
||||||
from heat.engine import properties
|
from heat.engine import properties
|
||||||
|
@ -18,6 +18,7 @@ import time
|
|||||||
from keystoneclient import exceptions as kc_exceptions
|
from keystoneclient import exceptions as kc_exceptions
|
||||||
from mox import IgnoreArg
|
from mox import IgnoreArg
|
||||||
from oslo.config import cfg
|
from oslo.config import cfg
|
||||||
|
from six.moves import xrange
|
||||||
|
|
||||||
from heat.engine import environment
|
from heat.engine import environment
|
||||||
from heat.common import exception
|
from heat.common import exception
|
||||||
|
Loading…
Reference in New Issue
Block a user