def _api_response(self, event):
'''
Receives api/response callback.
'''
# Gets raw data for this event.
raw = self.read_raw(event)
# If raw was found, this is our Event body.
if raw:
event.set_body(raw)
# Wake up waiting command.
try:
_cmd_uuid, _async_res = self._commands_pool.pop(0)
except (IndexError, ValueError):
raise InternalSyncError("Cannot wakeup command !")
_async_res.set((_cmd_uuid, event))
return None
评论列表
文章目录