Blame SOURCES/oaa-1.2-unicode_issues_PR124.patch

ee798b
From 316d1fdd46e962c2eca32dde8b6d391286bd3d28 Mon Sep 17 00:00:00 2001
ee798b
From: Masahiro Matsuya <mmatsuya@redhat.com>
ee798b
Date: Fri, 7 Aug 2020 15:50:05 +0900
ee798b
Subject: [PATCH] avoiding UnicodeDecodeError in decode(). Output more errors
ee798b
 which starts with E: oscap
ee798b
ee798b
---
ee798b
 org_fedora_oscap/common.py | 3 ++-
ee798b
 1 file changed, 2 insertions(+), 1 deletion(-)
ee798b
ee798b
diff --git a/org_fedora_oscap/common.py b/org_fedora_oscap/common.py
ee798b
index 9b4b7bf..45ce727 100644
ee798b
--- a/org_fedora_oscap/common.py
ee798b
+++ b/org_fedora_oscap/common.py
ee798b
@@ -136,8 +136,9 @@ def execute(self, ** kwargs):
ee798b
 
ee798b
         (stdout, stderr) = proc.communicate()
ee798b
         self.stdout = stdout.decode()
ee798b
-        self.stderr = stderr.decode()
ee798b
+        self.stderr = stderr.decode(errors="replace")
ee798b
         self.messages = re.findall(r'OpenSCAP Error:.*', self.stderr)
ee798b
+        self.messages = self.messages + re.findall(r'E: oscap:.*', self.stderr)
ee798b
 
ee798b
         self.returncode = proc.returncode
ee798b