Opened 2 years ago

Closed 2 years ago

#3491 closed bug (Fixed)

Console UI should not depend on core modules

Reported by: Cas Owned by:
Priority: major Milestone: 2.0.6
Component: Console UI Version: 2.0.0
Keywords: Cc:


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

This means that it is harder to package console UI without including the core code so should be replaced

Change History (3)

comment:1 Changed 2 years ago by DjLegolas

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:

  1. Move the defaults to a different file, outside of core.preferencesmanager.
  2. Add an exported function that will return it.

I have a feeling that there might be a better solution for this.

comment:2 Changed 2 years ago by Cas

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 Changed 2 years ago by Cas

  • Resolution set to Fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.