Module: deluge Branch: master Commit: 3fdfedb7f707917c9a6eed3aecb46a096bdb9d84
Author: Damien Churchill <[email protected]> Date: Sat Apr 24 00:34:42 2010 +0100 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 527d98e..d247e07 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 7df162f..decd963 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): """ -- 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.
