diff options
author | Bryan Forbes | 2010-04-01 01:09:52 -0500 |
---|---|---|
committer | Martin Szulecki | 2012-03-20 23:25:55 +0100 |
commit | acac4f819ccafa6f6bb945626f2e21ec2b75074b (patch) | |
tree | fc6881c387ee1e4527ed2b3ca73d1059bc8fc4f2 /cython/property_list_client.pxi | |
parent | af06ff22149191c056804e7fec9c1a6880a06872 (diff) | |
download | libimobiledevice-acac4f819ccafa6f6bb945626f2e21ec2b75074b.tar.gz libimobiledevice-acac4f819ccafa6f6bb945626f2e21ec2b75074b.tar.bz2 |
Cleaned up Makefile.am.
Added the cython m4 files.
Cleaned up afc.pxi.
Make sure the event callback and installation proxy callback aquire the GIL.
Implemented some cleanup before the error handlers raise.
Diffstat (limited to 'cython/property_list_client.pxi')
-rw-r--r-- | cython/property_list_client.pxi | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cython/property_list_client.pxi b/cython/property_list_client.pxi index 874f2b5..2f9ce76 100644 --- a/cython/property_list_client.pxi +++ b/cython/property_list_client.pxi @@ -4,8 +4,16 @@ cdef class PropertyListClient(Base): self.handle_error(self._send(n._c_node)) cpdef object receive(self): - cdef plist.plist_t c_node = NULL - self.handle_error(self._receive(&c_node)) + cdef: + plist.plist_t c_node = NULL + int16_t err + err = self._receive(&c_node) + try: + self.handle_error(err) + except BaseError, e: + if c_node != NULL: + plist_free(c_node) + raise return plist.plist_t_to_node(c_node) |