def unbufferize_arg(worker: AbstractWorker, protobuf_arg: ArgPB) -> object: protobuf_arg_field = getattr(protobuf_arg, protobuf_arg.WhichOneof("arg")) try: arg = _unbufferize(worker, protobuf_arg_field) except: arg = protobuf_arg_field return arg
def unbufferize_arg(worker: AbstractWorker, protobuf_arg: ArgPB) -> object: protobuf_field_name = protobuf_arg.WhichOneof("arg") protobuf_arg_field = getattr(protobuf_arg, protobuf_field_name) if protobuf_field_name == "arg_list": arg = [unbufferize_arg(worker, i) for i in protobuf_arg_field.args] else: try: arg = _unbufferize(worker, protobuf_arg_field) except: arg = protobuf_arg_field return arg