From dfc14ff785321b4e4fee10c3bd50f4a5463403b7 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 14 Jun 2008 00:49:34 +0000 Subject: [PATCH] Fix #207 do not exit if dbus is unavailable, just give warning. --- deluge/ui/gtkui/gtkui.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index a3cfa083a..f95553619 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -57,7 +57,11 @@ from statusbar import StatusBar from connectionmanager import ConnectionManager from signals import Signals from pluginmanager import PluginManager -from dbusinterface import DbusInterface +try: + from dbusinterface import DbusInterface +except Exception, e: + log.error("Unable to load DBUS component. This will limit functionality!") + from queuedtorrents import QueuedTorrents from addtorrentdialog import AddTorrentDialog from coreconfig import CoreConfig @@ -131,7 +135,10 @@ class GtkUI: # Start the Dbus Interface before anything else.. Just in case we are # already running. self.queuedtorrents = QueuedTorrents() - self.dbusinterface = DbusInterface(args) + try: + self.dbusinterface = DbusInterface(args) + except Exception, e: + log.warning("Unable to start DBUS component. This will limit functionality!") # We make sure that the UI components start once we get a core URI client.connect_on_new_core(self._on_new_core)