Blame SOURCES/sos-bz2012856-dryrun-uncaught-exception.patch

003633
From e56b3ea999731b831ebba80cf367e43e65c12b62 Mon Sep 17 00:00:00 2001
003633
From: Pavel Moravec <pmoravec@redhat.com>
003633
Date: Mon, 4 Oct 2021 14:43:08 +0200
003633
Subject: [PATCH] [report] Overwrite pred=None before refering predicate
003633
 attributes
003633
003633
During a dry run, add_journal method sets pred=None whilst log_skipped_cmd
003633
refers to predicate attributes. In that case, replace None predicate
003633
by a default / empty predicate.
003633
003633
Resolves: #2711
003633
003633
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
003633
---
003633
 sos/report/plugins/__init__.py | 2 ++
003633
 1 file changed, 2 insertions(+)
003633
003633
diff --git a/sos/report/plugins/__init__.py b/sos/report/plugins/__init__.py
003633
index 3c2b64d9..c635b8de 100644
003633
--- a/sos/report/plugins/__init__.py
003633
+++ b/sos/report/plugins/__init__.py
003633
@@ -1693,6 +1693,8 @@ class Plugin():
003633
     def _add_cmd_output(self, **kwargs):
003633
         """Internal helper to add a single command to the collection list."""
003633
         pred = kwargs.pop('pred') if 'pred' in kwargs else SoSPredicate(self)
003633
+        if pred is None:
003633
+            pred = SoSPredicate(self)
003633
         if 'priority' not in kwargs:
003633
             kwargs['priority'] = 10
003633
         if 'changes' not in kwargs:
003633
-- 
003633
2.31.1
003633