Don't evaluate callable data returned from the plugin API

svn: r15790
This commit is contained in:
Doug Blank 2010-08-22 01:00:16 +00:00
parent b62c42d85e
commit 00f738f953

View File

@ -384,14 +384,7 @@ class BasePluginManager(object):
retval = []
data = None
for plugin in self.__pgr.general_plugins(category):
if callable(plugin.data):
try:
data = plugin.data()
except:
import traceback
traceback.print_exc()
else:
data = plugin.data
data = plugin.data
try:
iter(data)
retval.extend(data)
@ -416,14 +409,7 @@ class BasePluginManager(object):
mod = self.load_plugin(plugin)
if hasattr(mod, plugin.process):
process = getattr(mod, plugin.process)
if callable(plugin.data):
try:
data = plugin.data()
except:
import traceback
traceback.print_exc()
else:
data = plugin.data
data = plugin.data
if data:
try:
iter(data)