[Pkg-freevo-maint] Bug#575293: python-kaa-base: integration with twisted does not work anymore
Mickael Royer
mickael.royer at gmail.com
Wed Mar 24 20:14:20 UTC 2010
More information :
The problem does not appear in version 0.6.0-2 and is due to this diff :
diff -ru kaa/process.py kaa--new/process.py
--- kaa/process.py 2010-03-24 20:44:55.080934884 +0100
+++ kaa--new/process.py 2010-03-24 17:57:34.000000000 +0100
@@ -75,10 +75,8 @@
signal.siginterrupt(signal.SIGCHLD, False)
elif v[0] == 2 and v[1] == 5:
# Python 2.5
- import ctypes
- libc="libc.so.6"
- if not os.path.exists('/lib/'+libc): #ia64
- libc="libc.so.6.1"
+ import ctypes, ctypes.util
+ libc=ctypes.util.find_library('c')
ctypes.CDLL(libc).siginterrupt(signal.SIGCHLD, 0)
else:
# Python 2.4- is not supported.
When we import kaa, this code is called and ctypes.util.find_library
call popen function which force kaa notifier init.
So when we try to select a notifier after the import, an exception is
raised because kaa notifier is already initialized.
Thanks
Mickaël
On Wed, Mar 24, 2010 at 8:01 PM, Alexandre Rossi
<alexandre.rossi at gmail.com> wrote:
> Package: python-kaa-base
> Version: 0.6.0-4
> Severity: normal
>
> Hi,
>
> Using the following snippet, from the documentation[1], integration with
> twisted does not work anymore. Maybe this is related to the new twisted
> version 10.
>
> --
> # get reactor
> from twisted.internet import reactor
>
> import kaa
> kaa.main.select_notifier('twisted')
>
> # add callbacks to Twisted or kaa
> # see test/kaa_in_twisted.py in the kaa.base package
>
> # run Twisted mainloop
> reactor.run()
> --
>
> The following exception is raised :
> $ python kaa_twisted.py
> Traceback (most recent call last):
> File "kaa_twisted.py", line 5, in <module>
> kaa.main.select_notifier('twisted')
> File "/usr/lib/python2.5/site-packages/kaa/main.py", line 89, in select_notifier
> return nf_thread.init(module, **options)
> File "/usr/lib/python2.5/site-packages/kaa/nf_thread.py", line 147, in init
> notifier.init( 'generic', force_internal=True, **options )
> File "/usr/lib/python2.5/site-packages/kaa/nf_wrapper.py", line 164, in init
> raise RuntimeError('notifier already initialized')
> RuntimeError: notifier already initialized
>
>
> Please note that the test supplied in kaa-base (test/kaa_in_twisted.py )
> also fails.
>
>
> Feel free to ask for more info.
>
> Thanks,
>
> Alex
>
> [1] http://doc.freevo.org/api/kaa/base/core/mainloop.html#integration-with-other-frameworks
>
>
> -- System Information:
> Debian Release: squeeze/sid
> APT prefers unstable
> APT policy: (500, 'unstable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 2.6.32-4-amd64 (SMP w/2 CPU cores)
> Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> Versions of packages python-kaa-base depends on:
> ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
> ii libglib2.0-0 2.22.4-1 The GLib library of C routines
> ii python 2.5.4-9 An interactive high-level object-o
> ii python-central 0.6.14+nmu2 register and build utility for Pyt
> ii python-sqlite 1.0.1-7+b1 python interface to SQLite 2
>
> python-kaa-base recommends no packages.
>
> python-kaa-base suggests no packages.
>
> -- no debconf information
>
>
>
More information about the Pkg-freevo-maint
mailing list