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
This commit is contained in:
Damien Churchill 2010-04-24 00:34:42 +01:00
parent 01e847b997
commit 3fdfedb7f7
2 changed files with 4 additions and 6 deletions

View File

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

View File

@ -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):
"""