Fix #207 do not exit if dbus is unavailable, just give warning.

This commit is contained in:
Andrew Resch 2008-06-14 00:49:34 +00:00
parent 5936aeebb6
commit dfc14ff785

View File

@ -57,7 +57,11 @@ from statusbar import StatusBar
from connectionmanager import ConnectionManager from connectionmanager import ConnectionManager
from signals import Signals from signals import Signals
from pluginmanager import PluginManager 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 queuedtorrents import QueuedTorrents
from addtorrentdialog import AddTorrentDialog from addtorrentdialog import AddTorrentDialog
from coreconfig import CoreConfig from coreconfig import CoreConfig
@ -131,7 +135,10 @@ class GtkUI:
# Start the Dbus Interface before anything else.. Just in case we are # Start the Dbus Interface before anything else.. Just in case we are
# already running. # already running.
self.queuedtorrents = QueuedTorrents() 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 # We make sure that the UI components start once we get a core URI
client.connect_on_new_core(self._on_new_core) client.connect_on_new_core(self._on_new_core)