summaryrefslogtreecommitdiff
path: root/cinderclient/shell.py
diff options
context:
space:
mode:
authorChuck Short <chuck.short@canonical.com>2013-06-19 20:46:46 -0500
committerChuck Short <chuck.short@canonical.com>2013-06-19 20:52:22 -0500
commit3044671b3647cd9a6b14b6262baa44567c6e995b (patch)
tree635e243e2c42b8396c2e02e2b40ad3d40ecad42a /cinderclient/shell.py
parent89fb1503e91ae6485058659086f46a1dc0454f07 (diff)
downloadpython-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/shell.py')
-rw-r--r--cinderclient/shell.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cinderclient/shell.py b/cinderclient/shell.py
index 9d4af09..9750d2f 100644
--- a/cinderclient/shell.py
+++ b/cinderclient/shell.py
@@ -465,9 +465,9 @@ class OpenStackCinderShell(object):
"""
commands = set()
options = set()
- for sc_str, sc in self.subcommands.items():
+ for sc_str, sc in list(self.subcommands.items()):
commands.add(sc_str)
- for option in sc._optionals._option_string_actions.keys():
+ for option in list(sc._optionals._option_string_actions.keys()):
options.add(option)
commands.remove('bash-completion')