Package: nicotine
Version: 1.2.9+dfsg-2
Severity: normal
Tags: patch

When Rhythmbox is selected as the "Now Playing" media player and you either 
issuing a /now command in 
a chat room or hit the test button in the "Edit" -> "Configure Now Playing" 
menu dialog, the following 
error appears in the status/log window at the bottom of the nicotine window.

ERROR while accessing the Rhythmbox DBus interface: global name 'dbus' is not 
defined

This can be rectified by modifying the nowplaying.py file as follows:

Add 'import dbus' to the top of the file - outside of the NowPlaying class 
definition

Correctly scope the bus method in the rbplayerobj variable assignment i.e. use:
rbplayerobj = self.bus.get_object(..) instead of rbplayerobj = 
bus.get_object(..)

Patch included

Regards

Os

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

Kernel: Linux 2.6.25
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages nicotine depends on:
ii  python                        2.5.2-1    An interactive high-level object-o
ii  python-gtk2                   2.12.1-6   Python bindings for the GTK+ widge
ii  python-support                0.8.1      automated rebuilding support for P

Versions of packages nicotine recommends:
ii  python-geoip                  1.2.1-2+b1 python bindings for the GeoIP IP-t
ii  python-notify                 0.1.1-2+b1 Python bindings for libnotify
ii  python-pyvorbis               1.3-2      A Python interface to the Ogg Vorb
ii  xdg-utils                     1.0.2-6    desktop integration utilities from

-- no debconf information
--- nowplaying.py.old	2008-06-21 04:17:36.000000000 +0100
+++ nowplaying.py	2008-06-21 04:16:30.000000000 +0100
@@ -15,6 +15,7 @@
 
 import gtk, gobject
 import os, commands, sys, re, thread, threading
+import dbus
 
 from pynicotine.utils import _
 
@@ -747,7 +748,7 @@
 		try:
 			rbshellobj = self.bus.get_object('org.gnome.Rhythmbox', '/org/gnome/Rhythmbox/Shell')
 			self.rbshell = dbus.Interface(rbshellobj, 'org.gnome.Rhythmbox.Shell')
-			rbplayerobj = bus.get_object('org.gnome.Rhythmbox', '/org/gnome/Rhythmbox/Player')
+			rbplayerobj = self.bus.get_object('org.gnome.Rhythmbox', '/org/gnome/Rhythmbox/Player')
 			rbplayer = dbus.Interface(rbplayerobj, 'org.gnome.Rhythmbox.Player')
 		except Exception, error:
 			self.frame.logMessage(_("ERROR while accessing the %(program)s DBus interface: %(error)s") % {"program": "Rhythmbox", "error": error })

Reply via email to