diff options
author | Chuck Short <chuck.short@canonical.com> | 2013-10-10 13:20:37 -0400 |
---|---|---|
committer | Chuck Short <chuck.short@canonical.com> | 2013-10-10 14:07:20 -0400 |
commit | b7b31bf64603f021cf4f82241e38c74b5601d48c (patch) | |
tree | f4befc0b01433718f5fdeb7f8e6455b8516784ea /keystoneclient/utils.py | |
parent | 4ae816bbfff7eb3d3bbe63f4e47e40dcb0b9c031 (diff) | |
download | python-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.py | 3 |
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) |