response data bug fix

This commit is contained in:
Volkan Şahin 2016-07-11 17:57:37 +03:00
parent 93ff867404
commit 5ad27dd929

View file

@ -34,7 +34,10 @@ class Messaging(object):
data['taskId'] = response.get_id() data['taskId'] = response.get_id()
data['responseCode'] = response.get_code() data['responseCode'] = response.get_code()
data['responseMessage'] = response.get_message() data['responseMessage'] = response.get_message()
data['responseData'] = json.loads(str(response.get_data())) response_data = None
if data['responseData'] is not None:
response_data = json.loads(str(response.get_data()))
data['responseData'] = response_data
data['contentType'] = response.get_content_type() data['contentType'] = response.get_content_type()
data['timestamp'] = response.get_timestamp() data['timestamp'] = response.get_timestamp()
@ -49,7 +52,12 @@ class Messaging(object):
data['commandExecutionId'] = response.get_execution_id() data['commandExecutionId'] = response.get_execution_id()
data['responseCode'] = response.get_code() data['responseCode'] = response.get_code()
data['responseMessage'] = response.get_message() data['responseMessage'] = response.get_message()
data['responseData'] = response.get_data()
response_data = None
if data['responseData'] is not None:
response_data = json.loads(str(response.get_data()))
data['responseData'] = response_data
data['contentType'] = response.get_content_type() data['contentType'] = response.get_content_type()
data['timestamp'] = response.get_timestamp() data['timestamp'] = response.get_timestamp()