Merge "Change bytes to str in servers_client for python3"
This commit is contained in:
commit
d145194f52
@ -211,6 +211,9 @@ class ServersClient(base_compute_client.BaseComputeClient):
|
|||||||
post_body)
|
post_body)
|
||||||
if body:
|
if body:
|
||||||
body = json.loads(body)
|
body = json.loads(body)
|
||||||
|
else:
|
||||||
|
if isinstance(body, bytes):
|
||||||
|
body = body.decode('utf-8')
|
||||||
self.validate_response(schema, resp, body)
|
self.validate_response(schema, resp, body)
|
||||||
return rest_client.ResponseBody(resp, body)
|
return rest_client.ResponseBody(resp, body)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user