summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Kurt Kiefer2014-09-09 12:56:12 -0700
committerGravatar Nikias Bassen2014-09-12 01:55:49 +0200
commit1af71817b934bff73a23794cb308606726b7b1ad (patch)
tree6de288e2a0c0e63c2f3f56242b15788232eba48c
parent25ed2d2af2a1de1bfffd1c4ca54c76d6a46c2bf9 (diff)
downloadlibimobiledevice-1af71817b934bff73a23794cb308606726b7b1ad.tar.gz
libimobiledevice-1af71817b934bff73a23794cb308606726b7b1ad.tar.bz2
cython: Don't fail printing an error message with no string description
Change-Id: I571e5f01423b505223ef7a9b1faedcb94011acd3
-rw-r--r--cython/imobiledevice.pyx5
1 files changed, 4 insertions, 1 deletions
diff --git a/cython/imobiledevice.pyx b/cython/imobiledevice.pyx
index fa5e7ae..607ff2f 100644
--- a/cython/imobiledevice.pyx
+++ b/cython/imobiledevice.pyx
@@ -7,7 +7,10 @@ cdef class BaseError(Exception):
property message:
def __get__(self):
- return self._lookup_table[self._c_errcode]
+ if self._c_errcode in self._lookup_table:
+ return self._lookup_table[self._c_errcode]
+ else:
+ return "Unknown error ({0})".format(self._c_errcode)
property code:
def __get__(self):