From 4f4e9a37230d43b874fe295ac0c52c1ece392350 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 15 Dec 2007 12:15:10 +0000 Subject: [PATCH] don't crash when dbus is not supported --- src/common/connection_handlers.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index b48dc2154..95384119a 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -835,11 +835,12 @@ class ConnectionDisco: if identity['category'] == 'pubsub' and identity['type'] == \ 'pep': self.pep_supported = True - listener = MusicTrackListener.get() - track = listener.get_playing_track() - if gajim.config.get('publish_tune'): - gajim.interface.roster._music_track_changed(listener, - track, self.name) + if dbus_support.supported: + listener = MusicTrackListener.get() + track = listener.get_playing_track() + if gajim.config.get('publish_tune'): + gajim.interface.roster._music_track_changed(listener, + track, self.name) break if features.__contains__(common.xmpp.NS_BYTESTREAM): gajim.proxy65_manager.resolve(jid, self.connection, self.name)