summaryrefslogtreecommitdiff
path: root/keystoneclient/utils.py
diff options
context:
space:
mode:
authorChuck Short <chuck.short@canonical.com>2013-10-10 13:20:37 -0400
committerChuck Short <chuck.short@canonical.com>2013-10-10 14:07:20 -0400
commitb7b31bf64603f021cf4f82241e38c74b5601d48c (patch)
treef4befc0b01433718f5fdeb7f8e6455b8516784ea /keystoneclient/utils.py
parent4ae816bbfff7eb3d3bbe63f4e47e40dcb0b9c031 (diff)
downloadpython-keystoneclient-b7b31bf64603f021cf4f82241e38c74b5601d48c.tar.gz
python3: Make iteritems py3k compat
Use six.iteritems to replace dictionary.iteritems() on python2 or dictionary.items() on python3. Change-Id: I972f065414e22d287bd7e00ab2c6e754f17afb75 Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'keystoneclient/utils.py')
-rw-r--r--keystoneclient/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/keystoneclient/utils.py b/keystoneclient/utils.py
index ae489c8..6902ed3 100644
--- a/keystoneclient/utils.py
+++ b/keystoneclient/utils.py
@@ -17,6 +17,7 @@ import hashlib
import sys
import prettytable
+import six
from keystoneclient import exceptions
@@ -74,7 +75,7 @@ def print_dict(d, wrap=0):
pt = prettytable.PrettyTable(['Property', 'Value'],
caching=False, print_empty=False)
pt.aligns = ['l', 'l']
- for (prop, value) in d.iteritems():
+ for (prop, value) in six.iteritems(d):
if value is None:
value = ''
value = _word_wrap(value, max_length=wrap)