Blame SOURCES/0007-Return-user-friendly-message-when-no-issues-found.patch

d18119
From e23e38124098d37b514e02531341af21e6fb0688 Mon Sep 17 00:00:00 2001
d18119
From: Rob Crittenden <rcritten@redhat.com>
d18119
Date: Mon, 14 Jun 2021 11:37:23 -0400
d18119
Subject: [PATCH] Return user-friendly message when no issues found
d18119
d18119
Return user-friendly message instead of empty string
d18119
when no issues found and using the "human" output type.
d18119
d18119
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1780062
d18119
Signed-off-by: Antonio Torres <antorres@redhat.com>
d18119
---
d18119
 src/ipahealthcheck/core/output.py | 2 ++
d18119
 1 file changed, 2 insertions(+)
d18119
d18119
diff --git a/src/ipahealthcheck/core/output.py b/src/ipahealthcheck/core/output.py
d18119
index cfd0f94..784263d 100644
d18119
--- a/src/ipahealthcheck/core/output.py
d18119
+++ b/src/ipahealthcheck/core/output.py
d18119
@@ -129,6 +129,8 @@ class Human(Output):
d18119
         super(Human, self).__init__(options)
d18119
 
d18119
     def generate(self, data):
d18119
+        if not data:
d18119
+            return "No issues found.\n"
d18119
         output = ''
d18119
         for line in data:
d18119
             kw = line.get('kw')
d18119
-- 
d18119
2.26.3
d18119