Module: deluge
Branch: master
Commit: ade5f596f4e22cdab9b67482c4d68ab0fda90ef3

Author: Damien Churchill <[email protected]>
Date:   Fri Apr 23 23:43:20 2010 +0100

don't raise an error if the script isn't in the resource

---

 deluge/ui/web/server.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py
index cf739a4..7df162f 100644
--- a/deluge/ui/web/server.py
+++ b/deluge/ui/web/server.py
@@ -363,8 +363,9 @@ class ScriptResource(resource.Resource, 
component.Component):
         if type not in ("dev", "debug", "normal"):
             type = "normal"
 
-        del self.__scripts[type]["scripts"][path]
-        self.__scripts[type]["order"].remove(path)
+        if path in self.__scripts[type]["scripts"]:
+            del self.__scripts[type]["scripts"][path]
+            self.__scripts[type]["order"].remove(path)
        
 
     def get_scripts(self, type=None):

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