mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 15:08:40 +00:00
[Console] Fix 'rm' command hanging when done
Commander.exec_command was await'ing returned deferreds as per commit 253eb22
.
Closes: https://github.com/deluge-torrent/deluge/pull/464
This commit is contained in:
parent
e83f6b84fb
commit
0e197ee07e
1 changed files with 4 additions and 1 deletions
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from twisted.internet import defer
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
from deluge.ui.client import client
|
from deluge.ui.client import client
|
||||||
|
|
||||||
|
@ -63,7 +65,7 @@ class Command(BaseCommand):
|
||||||
_('Confirm with -c to remove the listed torrents (Count: %d)')
|
_('Confirm with -c to remove the listed torrents (Count: %d)')
|
||||||
% len(torrent_ids)
|
% len(torrent_ids)
|
||||||
)
|
)
|
||||||
return
|
return defer.succeed(True)
|
||||||
|
|
||||||
def on_removed_finished(errors):
|
def on_removed_finished(errors):
|
||||||
if errors:
|
if errors:
|
||||||
|
@ -76,6 +78,7 @@ class Command(BaseCommand):
|
||||||
log.info('Removing %d torrents', len(torrent_ids))
|
log.info('Removing %d torrents', len(torrent_ids))
|
||||||
d = client.core.remove_torrents(torrent_ids, options.remove_data)
|
d = client.core.remove_torrents(torrent_ids, options.remove_data)
|
||||||
d.addCallback(on_removed_finished)
|
d.addCallback(on_removed_finished)
|
||||||
|
return d
|
||||||
|
|
||||||
def complete(self, line):
|
def complete(self, line):
|
||||||
# We use the ConsoleUI torrent tab complete method
|
# We use the ConsoleUI torrent tab complete method
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue