summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):