From cfe547b31aa421072bee7c1ac33d3e62f0a2c638 Mon Sep 17 00:00:00 2001 From: John Garland Date: Tue, 8 Jun 2010 01:22:19 +1000 Subject: [PATCH] Print a more informative error message if the torrent file doesn't exist --- deluge/ui/console/commands/add.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deluge/ui/console/commands/add.py b/deluge/ui/console/commands/add.py index 5af96c548..8d688187c 100644 --- a/deluge/ui/console/commands/add.py +++ b/deluge/ui/console/commands/add.py @@ -63,6 +63,9 @@ class Command(BaseCommand): # Keep a list of deferreds to make a DeferredList deferreds = [] for arg in args: + if not os.path.exists(arg): + self.console.write("{!error!}%s doesn't exist!" % arg) + continue if not os.path.isfile(arg): self.console.write("{!error!}This is a directory!") continue