diff options
author | Martin Hertz <mvhertz@gmail.com> | 2024-03-29 22:48:52 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2024-09-10 20:00:41 +0200 |
commit | 40d4f7efeff112922394d9ede0e934d1f9ceaea3 (patch) | |
tree | 501833418d3e37fb65a17f981767f25a0b867999 | |
parent | [Docs] Replace black/flake8 with pre-commit (diff) | |
download | deluge-40d4f7efeff112922394d9ede0e934d1f9ceaea3.tar.xz deluge-40d4f7efeff112922394d9ede0e934d1f9ceaea3.zip |
[Console] Fix 'move' command hanging when done
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 <calumlind+deluge@gmail.com>
Closes: https://github.com/deluge-torrent/deluge/pull/447
-rw-r--r-- | deluge/ui/console/cmdline/commands/move.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/deluge/ui/console/cmdline/commands/move.py b/deluge/ui/console/cmdline/commands/move.py index 67ee0af1d..1691f171b 100644 --- a/deluge/ui/console/cmdline/commands/move.py +++ b/deluge/ui/console/cmdline/commands/move.py @@ -41,12 +41,8 @@ class Command(BaseCommand): ) 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) |