Package: python-brlapi
Version: 3.10~r3724-1
Severity: important

Scenario:

>>> import brlapi
>>> b=brlapi.Connection()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/oaubert/<ipython console> in <module>()

/var/lib/python-support/python2.5/brlapi.so in brlapi.Connection.__init__()

TypeError: raise: exception class must be a subclass of BaseException

Explanation:
When initializing brlapi with no brltty demon started, the API should raise an 
Exception. But from python2.5 onwards, each exception class must be a subclass 
of BaseException (cf http://www.python.org/dev/peps/pep-0352/ )

Correction:
The error lies in the Bindings/Python/brlapi.pyx file, where the exception 
ConnectionError inherits from OperationError, which itself should inherit from 
BaseException. The following patch should fix this.

--- brlapi.pyx.old      2008-06-24 14:17:02.000000000 +0200
+++ brlapi.pyx  2008-05-22 12:31:00.000000000 +0200
@@ -67,7 +67,7 @@
 cimport c_brlapi
 include "constants.auto.pyx"
 
-cdef class OperationError(BaseException):
+cdef class OperationError:
        """Error while performing some operation"""
 
        cdef c_brlapi.brlapi_error_t error

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-brlapi depends on:
ii  libbrlapi0.5                3.10~r3724-1 braille display access via BRLTTY 
ii  libc6                       2.7-10       GNU C Library: Shared libraries
ii  python                      2.5.2-1      An interactive high-level object-o
ii  python-support              0.8.1        automated rebuilding support for P

python-brlapi recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to