def send_transfer_op_request(self, op): if not self.stub: # short circuit for testing widgets return transfer_op = warp_pb2.TransferOpRequest( info=warp_pb2.OpInfo(ident=op.sender, timestamp=op.start_time), sender_name=op.sender_name, receiver=self.ident, size=op.total_size, count=op.total_count, name_if_single=op.description, mime_if_single=op.mime_if_single, top_dir_basenames=op.top_dir_basenames) self.stub.ProcessTransferOpRequest(transfer_op)
def send_transfer_op_request(self, op): if not self.stub: # short circuit for testing widgets return logging.debug("Remote RPC: calling TransferOpRequest on '%s'" % (self.display_hostname)) transfer_op = warp_pb2.TransferOpRequest( info=warp_pb2.OpInfo(ident=op.sender, timestamp=op.start_time, readable_name=util.get_hostname()), sender_name=op.sender_name, receiver=self.ident, size=op.total_size, count=op.total_count, name_if_single=op.description, mime_if_single=op.mime_if_single, top_dir_basenames=op.top_dir_basenames) self.stub.ProcessTransferOpRequest(transfer_op)