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
This commit is contained in:
@ -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]
|
||||
|
Reference in New Issue
Block a user