[BRLTTY] Fix python error report
Samuel Thibault
samuel.thibault at ens-lyon.org
Sat Oct 8 15:19:23 EDT 2016
Hello,
I case brlapi didn't report a function name, we still need to set the
errfun property for the __str__ method below.
Samuel
-------------- next part --------------
diff --git a/Bindings/Python/brlapi.pyx b/Bindings/Python/brlapi.pyx
index 5a20979..0e9672e 100644
--- a/Bindings/Python/brlapi.pyx
+++ b/Bindings/Python/brlapi.pyx
@@ -93,6 +93,8 @@ class OperationError(Exception):
self.gaierrno = c_brlapi.brlapi_error.gaierrno
if (c_brlapi.brlapi_error.errfun):
self.errfun = c_brlapi.brlapi_error.errfun
+ else:
+ self.errfun = b""
def __str__(self):
cdef c_brlapi.brlapi_error_t error
More information about the BRLTTY
mailing list