From d0b3418cccc56956b4358454e5f5aafec75f31ca Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 9 Mar 2008 01:00:26 +0000 Subject: [PATCH] Fix preferences dialog to show when not connected to a daemon. --- deluge/ui/gtkui/preferences.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 18c9cdbd1..a9950d45b 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -40,6 +40,7 @@ import deluge.component as component from deluge.log import LOG as log from deluge.ui.client import aclient as client import deluge.common +import deluge.error from deluge.configmanager import ConfigManager class Preferences(component.Component): @@ -174,12 +175,15 @@ class Preferences(component.Component): # Update the preferences dialog to reflect current config settings self.core_config = {} - client.get_config(self._on_get_config) - client.get_available_plugins(self._on_get_available_plugins) - client.get_enabled_plugins(self._on_get_enabled_plugins) - client.get_listen_port(self._on_get_listen_port) - # Force these calls and block until we've done them all - client.force_call() + try: + client.get_config(self._on_get_config) + client.get_available_plugins(self._on_get_available_plugins) + client.get_enabled_plugins(self._on_get_enabled_plugins) + client.get_listen_port(self._on_get_listen_port) + # Force these calls and block until we've done them all + client.force_call() + except deluge.error.NoCoreError: + log.debug("Not connected to a daemon..") if self.core_config != {} and self.core_config != None: core_widgets = {