mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 15:08:40 +00:00
Fix add command reporting success for some failures
This commit is contained in:
parent
3bc25d44ee
commit
5a33e66c2c
1 changed files with 5 additions and 2 deletions
|
@ -65,9 +65,12 @@ class Command(BaseCommand):
|
||||||
t_options["download_location"] = os.path.expanduser(options["path"])
|
t_options["download_location"] = os.path.expanduser(options["path"])
|
||||||
|
|
||||||
def on_success(result):
|
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!")
|
self.console.write("{!success!}Torrent added!")
|
||||||
def on_fail(result):
|
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
|
# Keep a list of deferreds to make a DeferredList
|
||||||
deferreds = []
|
deferreds = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue