Package: python-kde3
Version: 3.16.0-4
Severity: important
Tags: patch

Running guidance-power-manager (an app that uses python-kde3), right-clicking
on the battery icon on the dock and choosing either suspend or resume, results
in the following error. The traceback indicates that the error occurs in
dcopext.py, hence the reason this bug is submitted to the python-kde3 package.

Traceback (most recent call last):
  File "/usr/share/python-support/kde-guidance/guidance-power-manager.py",
line 464, in hibernate
    self.lockScreen()
  File "/usr/share/python-support/kde-guidance/guidance-power-manager.py",
line 448, in lockScreen
    ok, foo = kdesktop.KScreensaverIface.lock()
  File "/usr/lib/python2.4/site-packages/dcopext.py", line 535, in __getattr__
    return DCOPMeth(self, item)
  File "/usr/lib/python2.4/site-packages/dcopext.py", line 578, in __init__
    self.methods  = [str(meth) for meth in dcopObj.objmethods]
TypeError: iteration over non-sequence

I'm not sure whether this is a geniune bug in python-kde3 or
guidance-power-manager is not using the library properly. The attached patch
fixes the problem, as far as guidance-power-manager is concerned, but I leave
it to you whether that's the right way to go.

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

Kernel: Linux 2.6.22-3-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=el_GR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-kde3 depends on:
ii  kdelibs4c2a             4:3.5.8.dfsg.1-7 core libraries and binaries for al
ii  konsole                 4:3.5.8.dfsg.1-2 X terminal emulator for KDE
ii  libc6                   2.7-6            GNU C Library: Shared libraries
ii  libgcc1                 1:4.3-20080202-1 GCC support library
ii  libqt3-mt               3:3.3.8b-4       Qt GUI Library (Threaded runtime v
ii  libstdc++6              4.3-20080202-1   The GNU Standard C++ Library v3
ii  libx11-6                2:1.0.3-7        X11 client-side library
ii  libxext6                1:1.0.3-2        X11 miscellaneous extension librar
ii  python                  2.4.4-6          An interactive high-level object-o
ii  python-central          0.5.15-0.1       register and build utility for Pyt
ii  python-qt3              3.17.4-1         Qt3 bindings for Python

python-kde3 recommends no packages.

-- no debconf information
--- python-kde3-3.16.0.orig/extensions/dcopext.py	2006-09-22 04:11:16.000000000 +0100
+++ python-kde3-3.16.0/extensions/dcopext.py	2008-02-27 19:59:51.000000000 +0000
@@ -575,7 +575,10 @@ class DCOPMeth(object):
 		self.objname  = dcopObj.objname
 		self.methname = name
 		self.client   = dcopObj.objclient
-		self.methods  = [str(meth) for meth in dcopObj.objmethods]
+		try:
+			self.methods  = [str(meth) for meth in dcopObj.objmethods]
+		except TypeError:
+			self.methods = []
 		self.valid    = self.findMethod()
 #		
 #		if not self.valid:

Reply via email to