Merge "py33: 'dict_keys' object does not support indexing"
This commit is contained in:
commit
935e1fe167
novaclient
@ -206,7 +206,7 @@ def from_response(response, body, url, method=None):
|
||||
details = "n/a"
|
||||
|
||||
if hasattr(body, 'keys'):
|
||||
error = body[body.keys()[0]]
|
||||
error = body[list(body)[0]]
|
||||
message = error.get('message', None)
|
||||
details = error.get('details', None)
|
||||
|
||||
|
@ -113,7 +113,7 @@ class FakeHTTPClient(fakes.FakeHTTPClient):
|
||||
|
||||
def post_os_baremetal_nodes_1_action(self, **kw):
|
||||
body = kw['body']
|
||||
action = body.keys()[0]
|
||||
action = list(body)[0]
|
||||
if action == "add_interface":
|
||||
return (
|
||||
200, {}, {
|
||||
|
@ -488,7 +488,7 @@ class FakeHTTPClient(base_client.HTTPClient):
|
||||
_body = None
|
||||
resp = 202
|
||||
assert len(body.keys()) == 1
|
||||
action = body.keys()[0]
|
||||
action = list(body)[0]
|
||||
if action == 'reboot':
|
||||
assert body[action].keys() == ['type']
|
||||
assert body[action]['type'] in ['HARD', 'SOFT']
|
||||
|
Loading…
x
Reference in New Issue
Block a user