Merge "Use list instead of six.viewkeys to avoid py2 to py3 problems" into stable/stein
This commit is contained in:
commit
a9d291bd84
|
@ -19,7 +19,6 @@ from oslo_log import log as logging
|
|||
from oslo_policy import policy as oslo_policy
|
||||
from oslo_utils import excutils
|
||||
from pecan import hooks
|
||||
import six
|
||||
import webob
|
||||
|
||||
from neutron._i18n import _
|
||||
|
@ -122,7 +121,7 @@ class PolicyHook(hooks.PecanHook):
|
|||
original_resources.append(resource_obj)
|
||||
obj = copy.copy(resource_obj)
|
||||
obj.update(item)
|
||||
obj[const.ATTRIBUTES_TO_UPDATE] = six.viewkeys(item)
|
||||
obj[const.ATTRIBUTES_TO_UPDATE] = list(item)
|
||||
# Put back the item in the list so that policies could be
|
||||
# enforced
|
||||
resources_copy.append(obj)
|
||||
|
@ -224,7 +223,7 @@ class PolicyHook(hooks.PecanHook):
|
|||
to see them.
|
||||
"""
|
||||
attributes_to_exclude = []
|
||||
for attr_name in six.viewkeys(data):
|
||||
for attr_name in list(data):
|
||||
# TODO(amotoki): All attribute maps have tenant_id and
|
||||
# it determines excluded attributes based on tenant_id.
|
||||
# We need to migrate tenant_id to project_id later
|
||||
|
|
Loading…
Reference in New Issue