X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython-cffi%2Fnotmuch2%2F_errors.py;fp=bindings%2Fpython-cffi%2Fnotmuch2%2F_errors.py;h=17c3ad9cc39af7cf565f66aae9570bcba22a8f9c;hp=f55cc96b53bf44ba69cbbd0b5774626fc8006632;hb=95f0c59fe98b1404ca8a4042becf650aeb09b923;hpb=c01152885c565813aa9510481e425e7c61815b56 diff --git a/bindings/python-cffi/notmuch2/_errors.py b/bindings/python-cffi/notmuch2/_errors.py index f55cc96b..17c3ad9c 100644 --- a/bindings/python-cffi/notmuch2/_errors.py +++ b/bindings/python-cffi/notmuch2/_errors.py @@ -83,7 +83,8 @@ class NotmuchError(Exception): if self.message: return self.message elif self.status: - return capi.lib.notmuch_status_to_string(self.status) + char_str = capi.lib.notmuch_status_to_string(self.status) + return capi.ffi.string(char_str).decode(errors='replace') else: return 'Unknown error'