From 342a424a808dc9b80349d82ef629c29e864e982f Mon Sep 17 00:00:00 2001 From: Martin Hertz Date: Tue, 3 Sep 2024 21:48:51 +0200 Subject: [PATCH] [Console] Fix 'rm' command hanging when done Commander.exec_command was await'ing returned deferreds as per commit 253eb22. --- deluge/ui/console/cmdline/commands/rm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/ui/console/cmdline/commands/rm.py b/deluge/ui/console/cmdline/commands/rm.py index 4a3fd008a0..aebe868fb6 100644 --- a/deluge/ui/console/cmdline/commands/rm.py +++ b/deluge/ui/console/cmdline/commands/rm.py @@ -9,6 +9,8 @@ import logging +from twisted.internet import defer + import deluge.component as component from deluge.ui.client import client @@ -63,7 +65,7 @@ def handle(self, options): _('Confirm with -c to remove the listed torrents (Count: %d)') % len(torrent_ids) ) - return + return defer.succeed(True) def on_removed_finished(errors): if errors: @@ -76,6 +78,7 @@ def on_removed_finished(errors): log.info('Removing %d torrents', len(torrent_ids)) d = client.core.remove_torrents(torrent_ids, options.remove_data) d.addCallback(on_removed_finished) + return d def complete(self, line): # We use the ConsoleUI torrent tab complete method