Skip to content

Commit

Permalink
[Console] Fix 'move' command hanging when done
Browse files Browse the repository at this point in the history
Console.get_torrent_name() expects string, but was given list from console.match_torrent(), so NoneType breaking join() in move message.

Console.get_torrent_name() expects string, but was given list from console.match_torrent(), so NoneType breaking join() in move message. Simplified and fixed now.

Co-authored-by: Calum Lind <[email protected]>
Closes: #447
  • Loading branch information
mhertz and cas-- committed Sep 10, 2024
1 parent d064ad0 commit 40d4f7e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions deluge/ui/console/cmdline/commands/move.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,8 @@ def handle(self, options):
)
return

ids = []
names = []
for t_id in options.torrent_ids:
tid = self.console.match_torrent(t_id)
ids.extend(tid)
names.append(self.console.get_torrent_name(tid))
ids = self.console.match_torrents(options.torrent_ids)
names = [self.console.get_torrent_name(id_) for id_ in ids]

def on_move(res):
msg = 'Moved "{}" to {}'.format(', '.join(names), options.path)
Expand Down

0 comments on commit 40d4f7e

Please sign in to comment.