Blame SOURCES/bz1712263-fence_rhevm-2-fix-debug-encoding-issues.patch

21d5fd
From 965924fe8bf7dcd0bc15fb0e9265ab49bb8a5dd8 Mon Sep 17 00:00:00 2001
21d5fd
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
21d5fd
Date: Mon, 20 May 2019 15:49:39 +0200
21d5fd
Subject: [PATCH] fence_rhevm: fix debug encoding issues
21d5fd
21d5fd
Tested with UTF-8 encoded comment in result, which caused this issue,
21d5fd
and added to command and url in case they are in UTF-8 decoded state.
21d5fd
---
21d5fd
 agents/rhevm/fence_rhevm.py | 6 +++---
21d5fd
 1 file changed, 3 insertions(+), 3 deletions(-)
21d5fd
21d5fd
diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py
21d5fd
index 6012c423..9e4650cd 100644
21d5fd
--- a/agents/rhevm/fence_rhevm.py
21d5fd
+++ b/agents/rhevm/fence_rhevm.py
21d5fd
@@ -144,9 +144,9 @@ def send_command(opt, command, method="GET"):
21d5fd
 
21d5fd
 	result = web_buffer.getvalue().decode("UTF-8")
21d5fd
 
21d5fd
-	logging.debug("url: %s\n", url)
21d5fd
-	logging.debug("command: %s\n", command)
21d5fd
-	logging.debug("result: %s\n", result)
21d5fd
+	logging.debug("url: %s\n", url.encode("UTF-8"))
21d5fd
+	logging.debug("command: %s\n", command.encode("UTF-8"))
21d5fd
+	logging.debug("result: %s\n", result.encode("UTF-8"))
21d5fd
 
21d5fd
 	return result
21d5fd
 
21d5fd
-- 
21d5fd
2.21.0
21d5fd