diff options
| author | Tang Chen <chen.tang@easystack.cn> | 2016-03-12 10:58:28 +0800 |
|---|---|---|
| committer | Tang Chen <chen.tang@easystack.cn> | 2016-03-12 10:58:28 +0800 |
| commit | dc7e4fc15d80eed5a814f0b87e1860f0cd86c2ee (patch) | |
| tree | afed7e25c1b1fd153998d084270dcf61de710d8a /openstackclient/common/utils.py | |
| parent | 586a038afd26894b264bd716186ff1b9ad8844f9 (diff) | |
| download | python-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/common/utils.py')
| -rw-r--r-- | openstackclient/common/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py index 840da402..c6ed6a71 100644 --- a/openstackclient/common/utils.py +++ b/openstackclient/common/utils.py @@ -281,7 +281,7 @@ def get_client_class(api_name, version, version_map): client_path = version_map[str(version)] except (KeyError, ValueError): msg = "Invalid %s client version '%s'. must be one of: %s" % ( - (api_name, version, ', '.join(version_map.keys()))) + (api_name, version, ', '.join(list(version_map.keys())))) raise exceptions.UnsupportedVersion(msg) return importutils.import_class(client_path) |
