Author: andar
Revision: 5459
Log:
Fix starting plugins when enabled
Diff:
Modified: trunk/deluge/pluginmanagerbase.py
===================================================================
--- trunk/deluge/pluginmanagerbase.py 2009-07-06 04:54:45 UTC (rev 5458)
+++ trunk/deluge/pluginmanagerbase.py 2009-07-06 05:18:18 UTC (rev 5459)
@@ -44,6 +44,8 @@
import deluge.configmanager
from deluge.log import LOG as log
+import deluge.component as component
+
METADATA_KEYS = [
"Name",
"License",
@@ -132,8 +134,8 @@
log.error("Unable to instantiate plugin!")
log.exception(e)
instance.enable()
- if self.get_state() == "Started":
- component.start(instance.get_component_name())
+ if self.get_state() == component.COMPONENT_STATE.index("Started"):
+ component.start(instance.plugin.get_component_name())
plugin_name = plugin_name.replace("-", " ")
self.plugins[plugin_name] = instance
if plugin_name not in self.config["enabled_plugins"]:
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---