diff options
Diffstat (limited to 'cython/imobiledevice.pyx')
| -rw-r--r-- | cython/imobiledevice.pyx | 5 |
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): | |||
| 7 | 7 | ||
| 8 | property message: | 8 | property message: |
| 9 | def __get__(self): | 9 | def __get__(self): |
| 10 | return self._lookup_table[self._c_errcode] | 10 | if self._c_errcode in self._lookup_table: |
| 11 | return self._lookup_table[self._c_errcode] | ||
| 12 | else: | ||
| 13 | return "Unknown error ({0})".format(self._c_errcode) | ||
| 11 | 14 | ||
| 12 | property code: | 15 | property code: |
| 13 | def __get__(self): | 16 | def __get__(self): |
