From efa125ac83edf2b0a5855570eaea9d7e3d56407a Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 6 Jul 2009 05:18:18 +0000 Subject: [PATCH] Fix starting plugins when enabled --- deluge/pluginmanagerbase.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deluge/pluginmanagerbase.py b/deluge/pluginmanagerbase.py index d674a6560..baeef1675 100644 --- a/deluge/pluginmanagerbase.py +++ b/deluge/pluginmanagerbase.py @@ -44,6 +44,8 @@ import deluge.common import deluge.configmanager from deluge.log import LOG as log +import deluge.component as component + METADATA_KEYS = [ "Name", "License", @@ -132,8 +134,8 @@ class PluginManagerBase: 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"]: