| result = json.loads(result) | result = json.loads(result) | ||||
| if result.get('error'): | if result.get('error'): | ||||
| cls.handle_error(result) | cls.handle_error(result) | ||||
| return cls.get_message_response_data(result.get('data')) | |||||
| if 'data' in result: | |||||
| return cls.get_message_response_data(result.get('data')) | |||||
| except ValueError as e: | except ValueError as e: | ||||
| if e.args[0] != "I/O operation on closed file.": # ignore this error | if e.args[0] != "I/O operation on closed file.": # ignore this error | ||||
| raise CompletionStoppedError() | raise CompletionStoppedError() |