From a2d0cb7141449198222fd4c66f4418d2efb8bebf Mon Sep 17 00:00:00 2001 From: DjLegolas Date: Tue, 21 Dec 2021 20:58:18 +0200 Subject: [PATCH] [Console] Removed Core dependency from Console UI UIs should not depend on core directly, so removing the dependency in ConsoleUI. This is done by adding a hard-coded variable. Closes https://dev.deluge-torrent.org/ticket/3491 Closes: https://github.com/deluge-torrent/deluge/pull/320 --- deluge/ui/console/widgets/statusbars.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deluge/ui/console/widgets/statusbars.py b/deluge/ui/console/widgets/statusbars.py index fcf4f2f41..44cc15818 100644 --- a/deluge/ui/console/widgets/statusbars.py +++ b/deluge/ui/console/widgets/statusbars.py @@ -11,9 +11,10 @@ from __future__ import unicode_literals import deluge.common import deluge.component as component -from deluge.core.preferencesmanager import DEFAULT_PREFS from deluge.ui.client import client +DEFAULT_DAEMON_PORT = 58846 + class StatusBars(component.Component): def __init__(self): @@ -76,7 +77,7 @@ class StatusBars(component.Component): connection_info += '{!white,blue,bold!}@{!red,blue,bold!}%s' # Port - if info[1] == DEFAULT_PREFS['daemon_port']: + if info[1] == DEFAULT_DAEMON_PORT: connection_info += '{!white,blue!}:%s' else: connection_info += '{!status!}:%s'