Fix py3 compatibility (dict.iteritems()) in object_store

Change-Id: I50900ba74d8e3d1d913871f33921eb1111a1d983
Closes-Bug:#1696040
This commit is contained in:
Daniel Speichert 2017-06-06 00:10:13 -04:00
parent 7d85189395
commit 17d88b0828
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@
# under the License.
import copy
import six
from openstack.object_store import object_store_service
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
# is the same as account and container
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
# and update it with the new metadata values.