Module: deluge
Branch: 1.3-stable
Commit: 37137d9b54ecba61b2e712cc612766ba231694c1

Author: Andrew Resch <[email protected]>
Date:   Sat May  8 20:00:41 2010 -0700

Return 0 in get_free_space if the download_location is invalid

---

 deluge/core/core.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/deluge/core/core.py b/deluge/core/core.py
index 164a4bd..636d6b7 100644
--- a/deluge/core/core.py
+++ b/deluge/core/core.py
@@ -768,7 +768,10 @@ class Core(component.Component):
         """
         if not path:
             path = self.config["download_location"]
-        return deluge.common.free_space(path)
+        try:
+            return deluge.common.free_space(path)
+        except InvalidPathError:
+            return 0
 
     @export
     def get_libtorrent_version(self):

-- 
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