From ade5f596f4e22cdab9b67482c4d68ab0fda90ef3 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Fri, 23 Apr 2010 23:43:20 +0100 Subject: [PATCH] don't raise an error if the script isn't in the resource --- deluge/ui/web/server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index cf739a488..7df162f43 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):