Comment 48 for bug 135893

Revision history for this message
Urs Fleisch (ufleisch) wrote :

As I have no bluethooth device, I have removed /etc/rc2.d/S25bluetooth and kblueplugd crashes every time I start up. So I had a look at the problem and found the following bug:

/usr/bin/python /usr/bin/kblueplugd
line 34, in <module>
if len(manager.ListAdapters()):
NameError: name 'manager' is not defined

kblueplugd crashed with NameError in <module>()

The bluez dbus object is not found, but the program continues because the line with "exit" does not behave as expected (it does not call exit() because of the missing parentheses), so it should be fixed like this:

--- /usr/bin/kblueplugd.orig 2007-09-23 09:37:24.000000000 +0200
+++ /usr/bin/kblueplugd 2007-09-23 09:44:59.000000000 +0200
@@ -29,7 +29,7 @@
         manager = dbus.Interface(bus.get_object('org.bluez', '/org/bluez'), 'org.bluez.Manager')
 except:
         print "Unable to connect to bluez."
- exit
+ sys.exit(1)

 if len(manager.ListAdapters()):
         print "# of devices at startup:", len(manager.ListAdapters())