summaryrefslogtreecommitdiff
path: root/openstackclient/shell.py
diff options
context:
space:
mode:
authorTang Chen <chen.tang@easystack.cn>2016-03-12 10:58:28 +0800
committerTang Chen <chen.tang@easystack.cn>2016-03-12 10:58:28 +0800
commitdc7e4fc15d80eed5a814f0b87e1860f0cd86c2ee (patch)
treeafed7e25c1b1fd153998d084270dcf61de710d8a /openstackclient/shell.py
parent586a038afd26894b264bd716186ff1b9ad8844f9 (diff)
downloadpython-openstackclient-dc7e4fc15d80eed5a814f0b87e1860f0cd86c2ee.tar.gz
Fix dict.keys() compatibility for python 3
In Python 2, dict.keys() will return a list. But in Python 3, it will return an iterator. So we need to fix all the places that assuming dict.keys() is a list. Change-Id: I8d1cc536377b3e5c644cfaa0892e40d0bd7c11b1 Closes-Bug: #1556350
Diffstat (limited to 'openstackclient/shell.py')
-rw-r--r--openstackclient/shell.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py
index 53e9be08..7750f2a3 100644
--- a/openstackclient/shell.py
+++ b/openstackclient/shell.py
@@ -355,7 +355,7 @@ class OpenStackShell(app.App):
self.log.warning(
"%s version %s is not in supported versions %s"
% (api, version_opt,
- ', '.join(mod.API_VERSIONS.keys())))
+ ', '.join(list(mod.API_VERSIONS.keys()))))
# Command groups deal only with major versions
version = '.v' + version_opt.replace('.', '_').split('_')[0]