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" )
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()
def err(*args): raise _server.SerializationError( "Cannot use BlobMedia objects in task state.")