From ce123e043d2664bfdf26ce6d66ebf1c6e8d6fd36 Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Tue, 22 Jun 2010 23:06:47 +0200 Subject: GUI: don't try to use action plugins as reporters - action plugins can be specified in AnalyzerActionsAndReporters, but those are run automatically when user press "report" and gui shouldn't show them in reporter selector --- src/Gui/CReporterAssistant.py | 4 ++++ src/Gui/PluginList.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Gui/CReporterAssistant.py b/src/Gui/CReporterAssistant.py index 643e6fec..4e7b3269 100644 --- a/src/Gui/CReporterAssistant.py +++ b/src/Gui/CReporterAssistant.py @@ -481,9 +481,13 @@ class ReporterAssistant(): # so don't overwrite it if it's set if not reporters: reporters = AnalyzerActionsAndReporters[self.report.getAnalyzerName()] + # FIXME: split(',') doesn't work for RunApp("date", "date.txt") + # but since we don't have reporters with parameters, it will find + # the reporter plugins anyway, but it should be more clever... for reporter_name in reporters.split(','): reporter = pluginlist.getReporterByName(reporter_name) if reporter: + log1("Adding >>%s<< to reporters", reporter) self.reporters.append(reporter) except KeyError: # Analyzer has no associated reporters. diff --git a/src/Gui/PluginList.py b/src/Gui/PluginList.py index 288dfccf..f93e64e4 100644 --- a/src/Gui/PluginList.py +++ b/src/Gui/PluginList.py @@ -26,7 +26,7 @@ class PluginInfoList(list): def getReporterByName(self, name): try: - return [x for x in self if x["Name"] == name][0] + return [x for x in self if x["Name"] == name and x.Type == "Reporter" ][0] except: # if such reporter doesnt't exist return None return None -- cgit