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:
parent
01e847b997
commit
3fdfedb7f7
|
@ -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)
|
||||
|
||||
|
|
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue