[Deluge] #3505: Cannot add host on deluge-console (invalid port)

89 views
Skip to first unread message

Deluge

unread,
Feb 9, 2022, 5:19:41 PM2/9/22
to delug...@googlegroups.com
#3505: Cannot add host on deluge-console (invalid port)
----------------------------+------------------------
Reporter: tremby | Type: bug
Status: new | Priority: major
Milestone: needs verified | Component: Console UI
Version: 2.0.3 | Keywords:
----------------------------+------------------------
The "add host" option in deluge-console does not work.

I think the integer validation intended for the port field is checking the
contents of the host field, or something similar.

If I type in a string in the host field and a number in the port field, I
get "Error adding host -- localhost: Invalid port. Must be an integer".

Interestingly, if I fill the port number in to the host field, and the
hostname in to the port field, I get "58846: Invalid port. Must be an
integer".

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3505>
Deluge <https://deluge-torrent.org/>
Deluge Project

Deluge

unread,
Feb 15, 2022, 10:38:17 AM2/15/22
to delug...@googlegroups.com
#3505: Cannot add host on deluge-console (invalid port)
-------------------------+-------------------
Reporter: tremby | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.1.0

Component: Console UI | Version: 2.0.3
Resolution: | Keywords:
-------------------------+-------------------
Changes (by Cas):

* milestone: needs verified => 2.1.0


--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3505#comment:1>

Deluge

unread,
Feb 17, 2022, 5:23:36 AM2/17/22
to delug...@googlegroups.com
#3505: Cannot add host on deluge-console (invalid port)
-------------------------+-------------------
Reporter: tremby | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.1.0

Component: Console UI | Version: 2.0.3
Resolution: | Keywords:
-------------------------+-------------------

Comment (by KtlTheBest):

Good time of the day. I am currently looking into the problem, but the
quick analysis shows that there is no conversion of port value to integer.

There is a `_do_add(result, **kwargs)` method in
`ui/console/modes/connectionmanager.py` which then calls
`add_host(hostname, port, username, password)` method from the same class,
which in turn calls the `add_host()` from the `Hostlist()` class which is
located in `ui/hostlist.py` which then raises the Exception.

The question is, at what stage does the conversion from the str to int
must happen?

Best regards,
KtlTheBest

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3505#comment:2>

Deluge

unread,
Feb 17, 2022, 3:37:44 PM2/17/22
to delug...@googlegroups.com
#3505: Cannot add host on deluge-console (invalid port)
-------------------------+-------------------
Reporter: tremby | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.1.0

Component: Console UI | Version: 2.0.3
Resolution: | Keywords:
-------------------------+-------------------

Comment (by Cas):

In the console connectionmanager I can see it is using `add_text_input`,
could try replacing it with an int input field e.g. `add_int_spin_input`

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3505#comment:3>

Deluge

unread,
Aug 14, 2023, 10:22:25 PM8/14/23
to delug...@googlegroups.com
#3505: Cannot add host on deluge-console (invalid port)
-------------------------+-------------------
Reporter: tremby | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.1.1

Component: Console UI | Version: 2.0.3
Resolution: | Keywords: fix
-------------------------+-------------------
Changes (by blob42):

* keywords: => fix


Comment:

{{{
# cast port to int in ui/console/modes/connectionmanager.py
self.hostlist.add_host(hostname, int(port), username, password)
}}}

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3505#comment:5>

Reply all
Reply to author
Forward
0 new messages