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"])
|
t_options["download_location"] = os.path.expanduser(options["path"])
|
||||||
|
|
||||||
def on_success(result):
|
def on_success(result):
|
||||||
self.console.write("{!success!}Torrent added!")
|
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):
|
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…
x
Reference in New Issue
Block a user