Opened 3 years ago
Closed 3 years ago
#3491 closed bug (Fixed)
Console UI should not depend on core modules
Reported by: | Calum | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 2.0.6 |
Component: | Console UI | Version: | 2.0.0 |
Keywords: | Cc: |
Description
While looking at a PR removing dependency on core.rpcserver in Web UI I wondered if any other UI components also had core module dependency and found:
from deluge.core.preferencesmanager import DEFAULT_PREFS
https://github.com/deluge-torrent/deluge/blob/develop/deluge/ui/console/widgets/statusbars.py#L14
This means that it is harder to package console UI without including the core code so should be replaced
Change History (3)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Since it's only used for the unchanging daemon_port I would just hard-code it to 58846.
If you wanted a better change we would set a common DEFAULT_DAEMON_PORT constant to be used throughout the code but we don't really gain anything.
comment:3 by , 3 years ago
Resolution: | → Fixed |
---|---|
Status: | new → closed |
To change this, we should have a way to get the default values from
preferencesmanager
.There are 2 ways that I can think of right now:
core.preferencesmanager
.I have a feeling that there might be a better solution for this.