From 3fdfedb7f707917c9a6eed3aecb46a096bdb9d84 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Sat, 24 Apr 2010 00:34:42 +0100 Subject: [PATCH] revert previous change, we want remove_script to throw an error if the script doesn't exist fix remove debug and dev scripts in the pluginmanager --- deluge/ui/web/pluginmanager.py | 4 ++-- deluge/ui/web/server.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/deluge/ui/web/pluginmanager.py b/deluge/ui/web/pluginmanager.py index 527d98e8b..d247e0729 100644 --- a/deluge/ui/web/pluginmanager.py +++ b/deluge/ui/web/pluginmanager.py @@ -93,8 +93,8 @@ class PluginManager(PluginManagerBase, component.Component): scripts.remove_script("%s/%s" % (name.lower(), os.path.basename(script).lower())) for script in info["debug_scripts"]: - scripts.remove_script("%s/%s" % (name.lower(), os.path.basename(script).lower())) - scripts.remove_script("%s/%s" % (name.lower(), os.path.basename(script).lower())) + scripts.remove_script("%s/%s" % (name.lower(), os.path.basename(script).lower()), "debug") + scripts.remove_script("%s/%s" % (name.lower(), os.path.basename(script).lower()), "dev") super(PluginManager, self).disable_plugin(name) diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index 7df162f43..decd96301 100644 --- a/deluge/ui/web/server.py +++ b/deluge/ui/web/server.py @@ -363,10 +363,8 @@ class ScriptResource(resource.Resource, component.Component): if type not in ("dev", "debug", "normal"): type = "normal" - if path in self.__scripts[type]["scripts"]: - del self.__scripts[type]["scripts"][path] - self.__scripts[type]["order"].remove(path) - + del self.__scripts[type]["scripts"][path] + self.__scripts[type]["order"].remove(path) def get_scripts(self, type=None): """