From ecd2666f96632327a649043bd4fe3a13f81ddf87 Mon Sep 17 00:00:00 2001 From: Jason Paryani Date: Wed, 13 Nov 2013 22:14:29 -0800 Subject: [PATCH] Add missing exception handler on to_bytes --- capnp/capnp.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capnp/capnp.pyx b/capnp/capnp.pyx index 6200410..7e04386 100644 --- a/capnp/capnp.pyx +++ b/capnp/capnp.pyx @@ -869,7 +869,7 @@ cdef class _DynamicStructBuilder: _write_packed_message_to_fd(file.fileno(), self._parent) self._is_written = True - def to_bytes(_DynamicStructBuilder self): + cpdef to_bytes(_DynamicStructBuilder self) except +reraise_kj_exception: """Returns the struct's containing message as a Python bytes object in the unpacked binary format. This is inefficient; it makes several copies.