Fix py3 compatibility (dict.iteritems()) in object_store
Change-Id: I50900ba74d8e3d1d913871f33921eb1111a1d983 Closes-Bug:#1696040
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
import six
|
||||||
|
|
||||||
from openstack.object_store import object_store_service
|
from openstack.object_store import object_store_service
|
||||||
from openstack.object_store.v1 import _base
|
from openstack.object_store.v1 import _base
|
||||||
@@ -167,7 +168,7 @@ class Object(_base.BaseResource):
|
|||||||
# Filter out items with empty values so the create metadata behaviour
|
# Filter out items with empty values so the create metadata behaviour
|
||||||
# is the same as account and container
|
# is the same as account and container
|
||||||
filtered_metadata = \
|
filtered_metadata = \
|
||||||
{key: value for key, value in metadata.iteritems() if value}
|
{key: value for key, value in six.iteritems(metadata) if value}
|
||||||
|
|
||||||
# Get a copy of the original metadata so it doesn't get erased on POST
|
# Get a copy of the original metadata so it doesn't get erased on POST
|
||||||
# and update it with the new metadata values.
|
# and update it with the new metadata values.
|
||||||
|
|||||||
Reference in New Issue
Block a user