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

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