summaryrefslogtreecommitdiff
path: root/openstackclient/common/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/common/exceptions.py')
-rw-r--r--openstackclient/common/exceptions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstackclient/common/exceptions.py b/openstackclient/common/exceptions.py
index 5f5f5ab1..ee0f7a11 100644
--- a/openstackclient/common/exceptions.py
+++ b/openstackclient/common/exceptions.py
@@ -122,7 +122,7 @@ def from_response(response, body):
cls = _code_map.get(response.status, ClientException)
if body:
if hasattr(body, 'keys'):
- error = body[body.keys()[0]]
+ error = body[list(body.keys())[0]]
message = error.get('message')
details = error.get('details')
else: