def caller(res, func): """ 异步回调中转器 :param res: :param func: :return: """ if isinstance(res, DTXServerRPCResult): res_dic = dict() header = selector_to_pyobject(res.raw._selector) if header: res_dic["header"] = header body = get_auxiliary_text(res.raw) if body: res_dic["body"] = body func(res_dic) else: func(res)
def dropped_message(res): print("[DROP]", res.parsed, get_auxiliary_text(res.raw))
def _callback(res): callback(get_auxiliary_text(res.raw))
def _show_log_message(res): logging.info(f"{res.parsed} : {get_auxiliary_text(res.raw)}") if 'Received test runner ready reply with error: (null' in ''.join( get_auxiliary_text(res.raw)): logging.info("_start_executing Test runner ready detected") _start_executing()