Py3 replace dict.iteritems with six.iteritems

All dict.iteritems in osc are replaced with six.iteritems
except this one.
So fix it to add py3 compatibility.

Change-Id: I1aa51399a36e650d262d839ce2b4ec04d3f91db2
This commit is contained in:
ting.wang 2016-02-24 10:14:56 +08:00
parent 58be3bcf79
commit e47c83d47a

View File

@ -551,7 +551,7 @@ class APIv1(api.BaseAPI):
log = logging.getLogger(__name__ + '._set_properties')
headers = {}
for k, v in properties.iteritems():
for k, v in six.iteritems(properties):
if not utils.is_ascii(k) or not utils.is_ascii(v):
log.error('Cannot set property %s to non-ascii value', k)
continue