diff options
author | Chuck Short <chuck.short@canonical.com> | 2013-06-19 20:46:46 -0500 |
---|---|---|
committer | Chuck Short <chuck.short@canonical.com> | 2013-06-19 20:52:22 -0500 |
commit | 3044671b3647cd9a6b14b6262baa44567c6e995b (patch) | |
tree | 635e243e2c42b8396c2e02e2b40ad3d40ecad42a /cinderclient/utils.py | |
parent | 89fb1503e91ae6485058659086f46a1dc0454f07 (diff) | |
download | python-cinderclient-3044671b3647cd9a6b14b6262baa44567c6e995b.tar.gz |
python3: Fix traceback while running tests
The testsuite is full of the following:
TypeError: 'dict_keys' object does not support indexing
This is due to the fact in python3 dict methods dict.keys(),
dict.items() and dict.values() return “views” instead of lists.
Change-Id: Ifa5383e6485fdbabf363fd1442877b2452346c1c
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'cinderclient/utils.py')
-rw-r--r-- | cinderclient/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cinderclient/utils.py b/cinderclient/utils.py index 6e87129..fe947a0 100644 --- a/cinderclient/utils.py +++ b/cinderclient/utils.py @@ -217,7 +217,7 @@ def find_resource(manager, name_or_id): def _format_servers_list_networks(server): output = [] - for (network, addresses) in server.networks.items(): + for (network, addresses) in list(server.networks.items()): if len(addresses) == 0: continue addresses_csv = ', '.join(addresses) |