Module: deluge
Branch: master
Commit: cfe547b31aa421072bee7c1ac33d3e62f0a2c638

Author: John Garland <[email protected]>
Date:   Tue Jun  8 01:22:19 2010 +1000

Print a more informative error message if the torrent file doesn't exist

---

 deluge/ui/console/commands/add.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/deluge/ui/console/commands/add.py 
b/deluge/ui/console/commands/add.py
index 5af96c5..8d68818 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

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to