diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-26 17:19:31 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-26 17:19:31 +0200 |
commit | 508a713fd489749c8ee56d47f47a984b09aaf318 (patch) | |
tree | 5c510d2a0cd05b3f905a36626130627022486684 /src/CLI/report.cpp | |
parent | 1c278e761795d1f669bebfc2fd3d2ac8c5e08392 (diff) | |
download | abrt-508a713fd489749c8ee56d47f47a984b09aaf318.tar.gz abrt-508a713fd489749c8ee56d47f47a984b09aaf318.tar.xz abrt-508a713fd489749c8ee56d47f47a984b09aaf318.zip |
abrt-cli: suppress misleading "crash 'XXXXXXXX' is not in database" messages
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/CLI/report.cpp')
-rw-r--r-- | src/CLI/report.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/CLI/report.cpp b/src/CLI/report.cpp index cb88c3ca..e3ecb0e3 100644 --- a/src/CLI/report.cpp +++ b/src/CLI/report.cpp @@ -647,17 +647,21 @@ static void get_reporter_plugin_settings(const vector_string_t& reporters, } /* Reports the crash with corresponding crash_id over DBus. */ -int report(const char *crash_id, bool always) +int report(const char *crash_id, int flags) { + int old_logmode = logmode; + if (flags & CLI_REPORT_SILENT_IF_NOT_FOUND) + logmode = 0; // Ask for an initial report. map_crash_data_t cr = call_CreateReport(crash_id); + logmode = old_logmode; if (cr.size() == 0) { return -1; } /* Open text editor and give a chance to review the backtrace etc. */ - if (!always) + if (!(flags & CLI_REPORT_BATCH)) { int result = run_report_editor(cr); if (result != 0) @@ -669,7 +673,7 @@ int report(const char *crash_id, bool always) int errors = 0; int plugins = 0; - if (always) + if (flags & CLI_REPORT_BATCH) { map_map_string_t reporters_settings; /* to be filled on the next line */ get_reporter_plugin_settings(reporters, reporters_settings, false); |