diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py index cfffaa29c..c2569154e 100644 --- a/deluge/ui/gtkui/connectionmanager.py +++ b/deluge/ui/gtkui/connectionmanager.py @@ -23,7 +23,7 @@ from deluge.error import AuthenticationRequired, BadLoginError, IncompatibleClie from deluge.ui.client import Client, client from deluge.ui.gtkui.common import get_clipboard_text from deluge.ui.gtkui.dialogs import AuthenticationDialog, ErrorDialog -from deluge.ui.hostlist import DEFAULT_PORT, HostList +from deluge.ui.hostlist import DEFAULT_PORT, LOCALHOST, HostList try: from urllib.parse import urlparse @@ -41,8 +41,6 @@ HOSTLIST_COL_PASS = 4 HOSTLIST_COL_STATUS = 5 HOSTLIST_COL_VERSION = 6 -LOCALHOST = ('127.0.0.1', 'localhost') - HOSTLIST_PIXBUFS = [ # This is populated in ConnectionManager.show ] diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index c40dfa41c..d3532242b 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -40,6 +40,7 @@ from deluge.common import fsize, fspeed, get_default_download_dir, osx_check, wi from deluge.configmanager import ConfigManager, get_config_dir from deluge.error import DaemonRunningError from deluge.ui.client import client +from deluge.ui.hostlist import LOCALHOST from deluge.ui.gtkui.addtorrentdialog import AddTorrentDialog from deluge.ui.gtkui.common import associate_magnet_links from deluge.ui.gtkui.connectionmanager import ConnectionManager @@ -340,7 +341,7 @@ class GtkUI(object): if self.config['autostart_localhost']: port = 0 for host_config in self.connectionmanager.hostlist.config['hosts']: - if host_config[1] in self.connectionmanager.LOCALHOST: + if host_config[1] in LOCALHOST: port = host_config[2] log.debug('Autostarting localhost: %s', host_config[0:3])