Fix preferences dialog to show when not connected to a daemon.
This commit is contained in:
parent
37f1560024
commit
d0b3418ccc
|
@ -40,6 +40,7 @@ import deluge.component as component
|
||||||
from deluge.log import LOG as log
|
from deluge.log import LOG as log
|
||||||
from deluge.ui.client import aclient as client
|
from deluge.ui.client import aclient as client
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
import deluge.error
|
||||||
from deluge.configmanager import ConfigManager
|
from deluge.configmanager import ConfigManager
|
||||||
|
|
||||||
class Preferences(component.Component):
|
class Preferences(component.Component):
|
||||||
|
@ -174,12 +175,15 @@ class Preferences(component.Component):
|
||||||
|
|
||||||
# Update the preferences dialog to reflect current config settings
|
# Update the preferences dialog to reflect current config settings
|
||||||
self.core_config = {}
|
self.core_config = {}
|
||||||
client.get_config(self._on_get_config)
|
try:
|
||||||
client.get_available_plugins(self._on_get_available_plugins)
|
client.get_config(self._on_get_config)
|
||||||
client.get_enabled_plugins(self._on_get_enabled_plugins)
|
client.get_available_plugins(self._on_get_available_plugins)
|
||||||
client.get_listen_port(self._on_get_listen_port)
|
client.get_enabled_plugins(self._on_get_enabled_plugins)
|
||||||
# Force these calls and block until we've done them all
|
client.get_listen_port(self._on_get_listen_port)
|
||||||
client.force_call()
|
# 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:
|
if self.core_config != {} and self.core_config != None:
|
||||||
core_widgets = {
|
core_widgets = {
|
||||||
|
|
Loading…
Reference in New Issue