From e533c5cdc947e94a85f1555f80150baa838b8727 Mon Sep 17 00:00:00 2001 From: Martin Hertz Date: Fri, 29 Mar 2024 22:48:52 +0100 Subject: [PATCH] [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 --- deluge/ui/console/cmdline/commands/move.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deluge/ui/console/cmdline/commands/move.py b/deluge/ui/console/cmdline/commands/move.py index 67ee0af1d6..969f40b36e 100644 --- a/deluge/ui/console/cmdline/commands/move.py +++ b/deluge/ui/console/cmdline/commands/move.py @@ -41,12 +41,12 @@ 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) + if not ids: + return + for t_id in ids: + names.append(self.console.get_torrent_name(t_id)) def on_move(res): msg = 'Moved "{}" to {}'.format(', '.join(names), options.path)