Python 3: use six.iteritems() instead of iteritems()

six.iteritems() replaces dictionary.iteritems() on Python 2 and
dictionary.items() on Python 3.

Change-Id: Ie5efa65c0a992e8136087a7b78ab8e8ce967326e
This commit is contained in:
Yassine Lamgarchal
2014-01-09 11:19:10 +01:00
parent 336feeb523
commit 2c2fdcbb39
2 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import six
import urllib
import warlock
@@ -59,7 +60,7 @@ class Controller(object):
if isinstance(tag, basestring):
tags_url_params.append({'tag': strutils.safe_encode(tag)})
for param, value in filters.iteritems():
for param, value in six.iteritems(filters):
if isinstance(value, basestring):
filters[param] = strutils.safe_encode(value)