This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
abrt-addon-python3/0136-cli-exit-with-the-number-of-unreported-problems.patch
Matej Habrnal 69165ba9cc Introduce abrt-addon-python3 package
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
2017-07-04 09:22:28 +02:00

52 lines
1.4 KiB
Diff

From 7cd921326a2cdba7fa268cd373477149b7118bff Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 4 Jun 2015 10:22:33 +0200
Subject: [PATCH] cli: exit with the number of unreported problems
This patch fixes the broken cli-sanity.
Related: #1224984
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/cli/report.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/cli/report.c b/src/cli/report.c
index 6af9769..194f7c9 100644
--- a/src/cli/report.c
+++ b/src/cli/report.c
@@ -50,6 +50,7 @@ int cmd_report(int argc, const char **argv)
load_abrt_conf();
free_abrt_conf_data();
+ int ret = 0;
while (*argv)
{
const char *dir_name = *argv++;
@@ -57,6 +58,7 @@ int cmd_report(int argc, const char **argv)
if (real_problem_id == NULL)
{
error_msg(_("Can't find problem '%s'"), dir_name);
+ ++ret;
continue;
}
@@ -65,6 +67,7 @@ int cmd_report(int argc, const char **argv)
{
error_msg(_("Can't take ownership of '%s'"), real_problem_id);
free(real_problem_id);
+ ++ret;
continue;
}
int status = report_problem_in_dir(real_problem_id,
@@ -84,5 +87,5 @@ int cmd_report(int argc, const char **argv)
exit(status);
}
- return 0;
+ return ret;
}
--
2.4.3