mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 07:58:38 +00:00
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
2 changed files with 4 additions and 6 deletions
|
@ -93,8 +93,8 @@ class PluginManager(PluginManagerBase, component.Component):
|
||||||
scripts.remove_script("%s/%s" % (name.lower(), os.path.basename(script).lower()))
|
scripts.remove_script("%s/%s" % (name.lower(), os.path.basename(script).lower()))
|
||||||
|
|
||||||
for script in info["debug_scripts"]:
|
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()), "debug")
|
||||||
scripts.remove_script("%s/%s" % (name.lower(), os.path.basename(script).lower()))
|
scripts.remove_script("%s/%s" % (name.lower(), os.path.basename(script).lower()), "dev")
|
||||||
|
|
||||||
super(PluginManager, self).disable_plugin(name)
|
super(PluginManager, self).disable_plugin(name)
|
||||||
|
|
||||||
|
|
|
@ -363,11 +363,9 @@ class ScriptResource(resource.Resource, component.Component):
|
||||||
if type not in ("dev", "debug", "normal"):
|
if type not in ("dev", "debug", "normal"):
|
||||||
type = "normal"
|
type = "normal"
|
||||||
|
|
||||||
if path in self.__scripts[type]["scripts"]:
|
|
||||||
del self.__scripts[type]["scripts"][path]
|
del self.__scripts[type]["scripts"][path]
|
||||||
self.__scripts[type]["order"].remove(path)
|
self.__scripts[type]["order"].remove(path)
|
||||||
|
|
||||||
|
|
||||||
def get_scripts(self, type=None):
|
def get_scripts(self, type=None):
|
||||||
"""
|
"""
|
||||||
Returns a list of the scripts that can be used for producing
|
Returns a list of the scripts that can be used for producing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue