mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 13:05:37 +00:00
Fix add command reporting success for some failures
This commit is contained in:
parent
3bc25d44ee
commit
5a33e66c2c
@ -65,9 +65,12 @@ class Command(BaseCommand):
|
||||
t_options["download_location"] = os.path.expanduser(options["path"])
|
||||
|
||||
def on_success(result):
|
||||
if not result:
|
||||
self.console.write("{!error!}Torrent was not added: Already in session")
|
||||
else:
|
||||
self.console.write("{!success!}Torrent added!")
|
||||
def on_fail(result):
|
||||
self.console.write("{!error!}Torrent was not added! %s" % result)
|
||||
self.console.write("{!error!}Torrent was not added: %s" % result)
|
||||
|
||||
# Keep a list of deferreds to make a DeferredList
|
||||
deferreds = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user