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

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