[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
This commit is contained in:
parent
d064ad06c5
commit
40d4f7efef
|
@ -41,12 +41,8 @@ class Command(BaseCommand):
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
ids = []
|
ids = self.console.match_torrents(options.torrent_ids)
|
||||||
names = []
|
names = [self.console.get_torrent_name(id_) for id_ in ids]
|
||||||
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))
|
|
||||||
|
|
||||||
def on_move(res):
|
def on_move(res):
|
||||||
msg = 'Moved "{}" to {}'.format(', '.join(names), options.path)
|
msg = 'Moved "{}" to {}'.format(', '.join(names), options.path)
|
||||||
|
|
Loading…
Reference in New Issue