diff options
author | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-06-22 23:06:47 +0200 |
---|---|---|
committer | Jiri Moskovcak <jmoskovc@redhat.com> | 2010-06-22 23:06:47 +0200 |
commit | ce123e043d2664bfdf26ce6d66ebf1c6e8d6fd36 (patch) | |
tree | 083160fd53634fe4f1046f310cefe8a4ce93d93c | |
parent | af82f994e39c60ee3c770ce8a724d5132161d24f (diff) | |
download | abrt-ce123e043d2664bfdf26ce6d66ebf1c6e8d6fd36.tar.gz abrt-ce123e043d2664bfdf26ce6d66ebf1c6e8d6fd36.tar.xz abrt-ce123e043d2664bfdf26ce6d66ebf1c6e8d6fd36.zip |
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
-rw-r--r-- | src/Gui/CReporterAssistant.py | 4 | ||||
-rw-r--r-- | src/Gui/PluginList.py | 2 |
2 files changed, 5 insertions, 1 deletions
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 |