Update oslo-incubator apiclient.exceptions module

Changes -
 * Fix usage of dict.keys in apiclient.exceptions

Change-Id: I495fa4f7483de693932f505275b1fa73f0790bea
This commit is contained in:
Matthew Farrellee
2014-02-20 19:34:35 -05:00
parent 5e7a9ab62f
commit b2c0b6218f

View File

@@ -425,8 +425,8 @@ def from_response(response, method, url):
except ValueError:
pass
else:
if hasattr(body, "keys"):
error = body[body.keys()[0]]
if isinstance(body, dict):
error = list(body.values())[0]
kwargs["message"] = error.get("message", None)
kwargs["details"] = error.get("details", None)
elif content_type.startswith("text/"):