コード例 #1
0
def write_pipe(data, bin=None):
    try:
        PIPE_OUT.send(data, bin)
    except ValueError:
        raise _server.SerializationError(
            "You can only pass strings, numbers, arrays, lists, LiveObjects and Media to or from server functions"
        )
コード例 #2
0
def write_pipe(data, bin=None):
    with WRITE_LOCK:
        try:
            s = b'X' + marshal.dumps(data)
            if bin is not None:
                s += marshal.dumps(bin)
        except ValueError:
            raise _server.SerializationError(
                "You can only pass strings, numbers, arrays, lists, LiveObjects and Media to or from server functions"
            )

        PIPE_OUT.write(s)
        PIPE_OUT.flush()
コード例 #3
0
 def err(*args):
     raise _server.SerializationError(
         "Cannot use BlobMedia objects in task state.")