Blame SOURCES/bz1712263-fence_rhevm-1-use-UTF8-encoding.patch

21d5fd
From a77165d7c8caadf514462d359c6d564048c2c33a Mon Sep 17 00:00:00 2001
21d5fd
From: Sandro <42254081+Numblesix@users.noreply.github.com>
21d5fd
Date: Tue, 29 Jan 2019 13:29:52 +0100
21d5fd
Subject: [PATCH] Changed Encoding to UTF-8
21d5fd
21d5fd
Starting from RHV/Ovirt 4.2 we saw issues with the agent(unable to fence) after switching to UTF-8 all worked again.
21d5fd
---
21d5fd
 agents/rhevm/fence_rhevm.py | 4 ++--
21d5fd
 1 file changed, 2 insertions(+), 2 deletions(-)
21d5fd
21d5fd
diff --git a/agents/rhevm/fence_rhevm.py b/agents/rhevm/fence_rhevm.py
21d5fd
index 2a5107cc6..a1cdaf605 100644
21d5fd
--- a/agents/rhevm/fence_rhevm.py
21d5fd
+++ b/agents/rhevm/fence_rhevm.py
21d5fd
@@ -88,7 +88,7 @@ def send_command(opt, command, method="GET"):
21d5fd
 	## send command through pycurl
21d5fd
 	conn = pycurl.Curl()
21d5fd
 	web_buffer = io.BytesIO()
21d5fd
-	conn.setopt(pycurl.URL, url.encode("ascii"))
21d5fd
+	conn.setopt(pycurl.URL, url.encode("UTF-8"))
21d5fd
 	conn.setopt(pycurl.HTTPHEADER, [
21d5fd
 		"Version: 3",
21d5fd
 		"Content-type: application/xml",
21d5fd
@@ -128,7 +128,7 @@ def send_command(opt, command, method="GET"):
21d5fd
 
21d5fd
 		opt["cookie"] = cookie
21d5fd
 
21d5fd
-	result = web_buffer.getvalue().decode()
21d5fd
+	result = web_buffer.getvalue().decode("UTF-8")
21d5fd
 
21d5fd
 	logging.debug("%s\n", command)
21d5fd
 	logging.debug("%s\n", result)