Make aodh tempest tests work with Python3

With Python3 aodh tests fails with below Error,
this patch fixes it:-

TypeError: a bytes-like object is required, not 'str'

Change-Id: I447c384a280e6225f3617a251314b307855d6025
Closes-Bug: #1809802
This commit is contained in:
yatin 2018-12-26 17:47:41 +05:30
parent ad3a328435
commit af38fe56ee
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ class AlarmingClient(rest_client.RestClient):
uri_prefix = "v2"
def deserialize(self, body):
return json.loads(body.replace("\n", ""))
return json.loads(body.decode('utf-8').replace("\n", ""))
def serialize(self, body):
return json.dumps(body)